Shared DDL families
Two families emit definition statements rather than loads: the CREATE TABLE
family, which renders for any table in the catalog regardless of layer, and
the schema family, the smallest contract in the engine.
ddl-table
Section titled “ddl-table”Templates: databricks/shared/create_table.jinja,
fabric/shared/create_table.jinja, snowflake/shared/create_table.jinja
Roots: table, options, build
The CREATE TABLE family, and the richest single root in the engine: table
carries the whole modeling picture (columns, keys, references, business
meaning, governance) plus a computed SQL namespace with the finished, aligned
DDL per platform. It renders for any table in the catalog regardless of layer.
Root: table
Section titled “Root: table”| Field | Type | Meaning |
|---|---|---|
table.name | string | The table’s name. |
table.schema | string | The resolved schema name; dbo when the table carries none. |
table.description | string? | The table comment. |
table.dataLayer | string | The table’s functional layer slug; empty when unset. |
table.kind | string | The vault entity kind (hub, link, satellite, and so on); empty when unclassified. Branch on it with {{ table.kind }}. |
table.custom | object | Org-defined custom attribute values at table grain; keys without a live definition never appear. |
table.connection.name | string | The table’s connection (required: a table with no resolvable connection refuses to render). |
table.connection.connectionType | string | Connector type (for example Azure Databricks, Snowflake). |
table.connection.catalog | string? | Default catalog; also the catalog_name widget default. |
table.connection.defaultSchema | string? | Connection default schema. |
table.businessEntity | object? | Conditional: the linked business entity: name, description, knownAs (pipe-joined synonyms), classifications (pipe-joined free-form labels, a historical name), tags. |
table.governance | object? | Conditional: entity-grain governance: entityName, classifications ({schemeKey, valueKeys} assignments), definitionStatus, retentionPolicy, freshnessTarget, owner and steward (resolved display names, never raw identifiers; dropped when the user is gone). |
table.columns[]
Section titled “table.columns[]”| Field | Type | Meaning |
|---|---|---|
columns[].name | string | Column name. |
columns[].dataType | string | Raw declared data type (before platform rendering). |
columns[].length / .precision / .scale | number? | Declared size facets, when the type carries them. |
columns[].ordinal | number | Column position; also the emitted sort order. |
columns[].isNullable / .isPrimaryKey / .isBusinessKey | boolean | Nullability and key flags. |
columns[].description | string? | Column comment. |
columns[].transformation | string? | The transformation expression with macro tokens already resolved. |
columns[].isIgnored | boolean? | Excluded from generation when true. |
columns[].changeType | string? | Change-tracking behavior marker. |
columns[].references | object? | Conditional: the resolved foreign-key target: table and column names (never identifiers) plus constraintName when declared. Absent for self-references and unresolvable links. |
columns[].businessAttribute | object? | Conditional: the mapped business attribute: name, description, classifications, definitionStatus (Approved drives governance_certified), plus the parent entity’s classifications and status for the fallback tier. |
columns[].custom | object | Custom attribute values at column grain. |
columns[].sql.tagsMap[] | {key, value}[] | Per-column governance tags: classification scheme keys, governance_certified, business_attribute. Values pre-escaped for interpolation inside a SQL string literal. |
columns[].sql.tagCount | number | Tag count; test the count, never the array. |
columns[].sql.safeName | string | The sanitized identifier the tag block emits. |
table.sql: the computed SQL namespace
Section titled “table.sql: the computed SQL namespace”Always computed by the engine; a pasted context’s table.sql,
columns[].sql, and options.widget are discarded and recomputed, so these
values are never stale.
| Field | Type | Meaning |
|---|---|---|
table.sql.qualifiedName | string | The parameterized table reference: IDENTIFIER() over the catalog_name binding, schema, and name. |
table.sql.qualifiedNameInExec | string | The same reference spelled for use inside a SET VARIABLE exec_sql body. |
table.sql.primaryKeyColumns / .primaryKeyColumnsSafe | string[] | Primary-key column names, raw and sanitized, index-aligned. |
table.sql.clusterByColumns / .clusterByColumnsSafe | string[] | CLUSTER BY candidates: non-binary primary keys, else the first non-binary business key, else empty. Raw and sanitized, aligned. |
table.sql.primaryKeyConstraintName | string | The ADD CONSTRAINT name (PK_ plus schema and name, sanitized). |
table.sql.tagsMap[] | {key, value}[] | Table-level tags derived from the business entity (BusinessName, KnownAs, Classifications, Tags), each emitted only when non-empty, values pre-escaped. |
table.sql.descriptionEscaped | string | The table comment through SQL escaping; empty when there is none. |
table.sql.columnCount / .primaryKeyCount / .clusterByCount / .tagCount | number | Precomputed sizes; branch on these, not on array truthiness. |
table.sql.ddl.databricks / .snowflake / .fabric | block | The finished, aligned CREATE TABLE block per platform (see the aligned DDL column), measured independently because the three platforms quote and render types differently. Each column entry also carries description and descriptionEscaped so a COMMENT still gates on the raw value. |
Root: options
Section titled “Root: options”Per-field resolution: engine defaults, then the organization’s build settings, then the per-table override.
| Field | Type | Meaning |
|---|---|---|
options.addPrimaryKeys | boolean | Emit PRIMARY KEY constraints; default true. |
options.addSqlComments | boolean | Emit COMMENT clauses; default true. |
options.addSqlTags | boolean | Emit SET TAGS blocks; default true. |
options.tableOwner | string? | Table owner principal (per-table, else the build setting). Non-empty declares the table_owner widget. |
options.targetDisplayTimeZone | string | Display time zone; empty means no SET TIME ZONE. |
options.locationClause / .partitionedByClause / .tableProperties / .optionClause / .clusterByClause | string? | Free-form clause overrides from the table’s options (tableProperties falls back to the build setting). |
options.storageLocation | string? | Per-table storage location from the layer’s catalog when default storage is off. Non-empty declares the location_path widget and emits LOCATION; empty means a managed table. |
options.widget.params | string[] | Ordered widget parameter names: always catalog_name first, then location_path and table_owner when applicable. |
options.widget.declareBlocks | string[] | One finished DECLARE plus SET VARIABLE line per parameter, index-aligned with params, defaults pre-escaped. |
options.widget.paramsClause | string | The parameters joined with a comma: the opening SELECT line, precomputed. |
The build root is the shared
build settings
record, resolved at organization scope (this family has no single project
scope).
schema-ddl
Section titled “schema-ddl”Templates: snowflake/shared/create_schema.jinja
Roots: schema
The smallest contract in the engine: one name.
| Field | Type | Meaning |
|---|---|---|
schema.name | string | The schema being created. |