public final class ModelBackedCatalogProvider extends Object implements CatalogProvider
CatalogProvider that wraps a single UnifiedCatalogModel, exposing it as a
fully-materialized snapshot. Used by JSON / YAML / DDL / dbt / dump readers — every
static-file source funnels here.
Plan §5.1 / §6. The model is translated into an InMemoryCatalogSnapshot once
during open(CatalogProviderConfig); subsequent snapshot(CatalogQuery)
calls return the same instance regardless of the query's narrowing options (model-backed
sources are always eager).
Identifier handling routes through CatalogIdentifierPolicy.parse using the
model's IdentifierConfig; per-segment qualified-name forms therefore honor every
vendor rule the validator enforced at load time.
| Constructor and Description |
|---|
ModelBackedCatalogProvider(UnifiedCatalogModel model) |
ModelBackedCatalogProvider(UnifiedCatalogModel model,
IdentifierConfig identifierConfigOverride)
Construct a provider with an explicit
IdentifierConfig override that
supersedes model.identifierConfig() when the snapshot keys are built. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
CatalogProviderId |
id() |
static InMemoryCatalogSnapshot |
materialize(UnifiedCatalogModel model)
Translate a
UnifiedCatalogModel into a fully-materialized
InMemoryCatalogSnapshot. |
static InMemoryCatalogSnapshot |
materialize(UnifiedCatalogModel model,
IdentifierConfig identifierConfig)
Same as
materialize(UnifiedCatalogModel) but uses identifierConfig
to build snapshot keys when non-null. |
void |
open(CatalogProviderConfig config) |
CatalogSnapshot |
refresh(CatalogQuery query)
Force a fresh fetch bypassing any internal caches.
|
CatalogSnapshot |
snapshot(CatalogQuery query) |
public ModelBackedCatalogProvider(UnifiedCatalogModel model)
public ModelBackedCatalogProvider(UnifiedCatalogModel model, IdentifierConfig identifierConfigOverride)
IdentifierConfig override that
supersedes model.identifierConfig() when the snapshot keys are built.
Callers (notably CatalogLoaders) use this when CatalogLoadOptions
carries an override the validator already accepted, so materialization keys
agree with the policy validation ran under.public CatalogProviderId id()
id in interface CatalogProviderpublic void open(CatalogProviderConfig config) throws CatalogException
open in interface CatalogProviderCatalogExceptionpublic CatalogSnapshot snapshot(CatalogQuery query) throws CatalogException
snapshot in interface CatalogProviderCatalogExceptionpublic CatalogSnapshot refresh(CatalogQuery query) throws CatalogException
CatalogProviderrefresh in interface CatalogProviderCatalogExceptionpublic void close() throws CatalogException
close in interface CatalogProviderclose in interface AutoCloseableCatalogExceptionpublic static InMemoryCatalogSnapshot materialize(UnifiedCatalogModel model)
UnifiedCatalogModel into a fully-materialized
InMemoryCatalogSnapshot. Public so the bridge layer can call this directly
when it needs a snapshot but does not want to wire a provider lifecycle.public static InMemoryCatalogSnapshot materialize(UnifiedCatalogModel model, IdentifierConfig identifierConfig)
materialize(UnifiedCatalogModel) but uses identifierConfig
to build snapshot keys when non-null. Pass null to fall back to
model.identifierConfig(). Used by CatalogLoaders so an explicit
CatalogLoadOptions.identifierConfig flows through to materialization
(otherwise the snapshot keys would diverge from the policy that validation accepted).