---
title: Databricks dbt - Datamart
description: Databricks dbt - Datamart generates a Mart layer for Databricks as a dbt project, from the objects of linked projects.
---

[Skip to content](https://knowledge.bigenius-x.com/databricks-dbt-datamart#main-content)

[Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en) [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal?hsLang=en)

[![TRI\_Logo\_biGENIUS\_2020\_RGB\_s](https://knowledge.bigenius-x.com/hs-fs/hubfs/Marketing/TRI_Logo_biGENIUS_2020_RGB_s.png?width=150&height=42&name=TRI_Logo_biGENIUS_2020_RGB_s.png)](https://www.bigenius-x.com/)

Open main navigation

Close main navigation

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new)
- [Go to Customer Portal](https://knowledge.bigenius-x.com/customer-portal)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [biGENIUS-X Knowledge Base](https://knowledge.bigenius-x.com/?hsLang=en)
2. [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en)
3. [Databricks](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks)

# Databricks dbt - Datamart

**Applies to**  
Platform: Databricks dbt  
Architecture: Data Mart

Databricks dbt - Datamart generates a Mart layer for Databricks as a dbt project, from the objects of linked projects. Select it in Project Settings, where Generator Configuration shows `Databricks Dbt DataMart`, when you load your data mart with dbt on Databricks. This article lists what the configuration supports and where it differs from [Databricks - Datamart](https://knowledge.bigenius-x.com/databricks-datamart-2.0?hsLang=en).

The configuration offers no load control, no deployment scripts and no data quality checks. The full list of features that are not available is under [Capabilities and limitations](https://knowledge.bigenius-x.com/databricks-dbt-datamart#capabilities-and-limitations).

### Scope and output

- Platform: Databricks with Unity Catalog. The configuration is available since Generator 2.2; Generator 2.1 contained a preview.
- Layers: Mart, and the layers of the linked projects. See [Understand the Layering concept](https://knowledge.bigenius-x.com/understand-the-layering-concept?hsLang=en).
- Output: one dbt project with the model folder `models/mart`, described in [dbt - Artifacts](https://knowledge.bigenius-x.com/dbt-artifacts?hsLang=en). dbt creates and loads the tables, see [dbt - Deployment](https://knowledge.bigenius-x.com/dbt-deployment?hsLang=en).

### Prerequisites

- A Databricks workspace with Unity Catalog, dbt Core with the adapter dbt-databricks, and a connection profile, as described in [Databricks dbt - Target environment](https://knowledge.bigenius-x.com/databricks-dbt-target-environment?hsLang=en). dbt 2 is not supported with Databricks dbt.
- At least one imported linked project, see [Import a Project to be used as a Linked Project](https://knowledge.bigenius-x.com/import-a-project-to-be-used-as-a-linked-project?hsLang=en). dbt does not run the linked project, so load it first.
- The values in `dbt_project.yml`, listed in [dbt - Placeholder values](https://knowledge.bigenius-x.com/dbt-placeholder-values?hsLang=en).

### Sources and linked projects

The configuration reads only model objects of linked projects: Raw Vault and Business Vault objects of a Data Vault project except Vault Out, Entity and Fact of a Dimensional project, and Store Entity of a Data Store project. When you import, select the source system type `Spark`.

[Databricks dbt - DataVault and Mart](https://knowledge.bigenius-x.com/databricks-dbt-datavault-and-mart?hsLang=en) builds the Data Vault and the Mart in one project, without linked projects.

dbt reads the linked objects as dbt sources. Each linked source system gets the variables `<source system>_catalog` and `<source system>_schema` in `dbt_project.yml` for the location of its tables. The table names come from the export: the result view when the exporting project has Create Result Views on, otherwise the table.

A project with the configuration [Databricks Dbt DataVault](https://knowledge.bigenius-x.com/databricks-dbt-datavault?hsLang=en) writes the Raw Vault and the Business Vault into separate schemas. [Export](https://knowledge.bigenius-x.com/export-a-project-to-be-used-as-linked-project?hsLang=en) the Raw Vault objects and the Business Vault objects separately, and import each export as its own linked source system. Each import needs its own export file, because the client refuses a file that was already uploaded on the branch.

### Supported model objects

- [Mart Dimension](https://knowledge.bigenius-x.com/create-a-mart-dimension?hsLang=en)
- [Mart Fact](https://knowledge.bigenius-x.com/create-a-mart-fact?hsLang=en)
- [Mart Composite](https://knowledge.bigenius-x.com/create-a-mart-composite?hsLang=en)
- [Mart Hierarchy Flatten](https://knowledge.bigenius-x.com/create-a-mart-hierachy-flatten?hsLang=en)
- [Mart Out](https://knowledge.bigenius-x.com/create-a-mart-out?hsLang=en)

### Capabilities and limitations

- Loading: dbt runs the models in the order of their references. A Mart Fact with more than one dataflow gets one loader model per dataflow.
- Incremental reads: a Mart Fact with the Fact Load Strategy `Insert` reads only new rows when `BG_IncrementalFilter` is mapped to the linked object's `BG_LoadTimestamp`, see [Configure an incremental load](https://knowledge.bigenius-x.com/configure-an-incremental-load?hsLang=en).
- Surrogate keys: a Mart Dimension with Implementation Type `Permanent` numbers new rows in `<model object name>_SK` with `ROW_NUMBER()` above the highest existing key. The unknown-member row has the key `-1`.
- Lookups: a Mart Fact reads the surrogate key from the Mart Dimension table, or from its result view with Create Result Views on. A source row without a matching dimension row gets `-1`.
- Historization: Mart Dimensions with SCD2 terms allow one dataflow.
- Validity: Mart Dimensions with SCD2 terms need [Persist Validity](https://knowledge.bigenius-x.com/persist-validity-project?hsLang=en) or [Create Result Views](https://knowledge.bigenius-x.com/create-result-views-project?hsLang=en). With both off, the client reports no validation error, but generation fails. Generate Artifacts shows `Generation failed. Fix errors and try again.` and one error per Mart Dimension on the part Mart Dimension Table. No download is offered.
- Keys: the model YAML files declare a primary key on the surrogate key and, with Use Unique Constraints on, a unique constraint on the business key. Only Mart Facts get foreign keys, with [Foreign Key Mode](https://knowledge.bigenius-x.com/foreign-key-mode-model-object?hsLang=en) `Create Disabled` (default). Foreign Key Mode offers `None` and `Create Disabled`.
- Hashes: [Hash Algorithm](https://knowledge.bigenius-x.com/hash-algorithm-project?hsLang=en) offers only `SHA-256`. Row hashes have the data type `Binary`.
- Data quality: data quality checks are not available. The menu of the model objects has no Manage Data Quality entry.

Implementation Type offers these values per model object type:

- Mart Dimension: `Permanent` (default) or `Cached` (materialization `bg_overwrite`)
- Mart Fact: `FactLoadStrategy`, with the [Fact Load Strategy](https://knowledge.bigenius-x.com/fact-load-strategy-dataflow?hsLang=en) `Truncate Insert` (default) or `Insert`
- Mart Composite and Mart Out: `Cached` or `Virtual` (default)
- Mart Hierarchy Flatten: `Cached`

These properties of Databricks - Datamart are not available:

- Model object: [Load Caching](https://knowledge.bigenius-x.com/load-caching-model-object?hsLang=en), Increment Management Type, [Use Sequential Dataflow Execution](https://knowledge.bigenius-x.com/use-sequential-dataflow-execution-model-object?hsLang=en), and File Format on Mart Hierarchy Flatten
- Project: [Configure LoadControl](https://knowledge.bigenius-x.com/configure-loadcontrol-project?hsLang=en), [Deploy LoadControl](https://knowledge.bigenius-x.com/deploy-loadcontrol-project?hsLang=en), [LoadControl Options](https://knowledge.bigenius-x.com/loadcontrol-options-project?hsLang=en), [Logging Method](https://knowledge.bigenius-x.com/logging-method-project?hsLang=en), [Deployment Options](https://knowledge.bigenius-x.com/deployment-options-project?hsLang=en), [Notebook Deployment Objects Limit](https://knowledge.bigenius-x.com/notebook-deployment-objects-limit-project?hsLang=en), [Use Unity Catalog](https://knowledge.bigenius-x.com/unity-catalog-project?hsLang=en)

### Project properties

Project Settings shows these properties in the groups Governance, Hashing, Historization and Implementation, with their defaults:

- [Apply Sensitivity Level Tags](https://knowledge.bigenius-x.com/apply-sensitivity-level-tags-project?hsLang=en): off
- [Sensitivity Level Tag Name](https://knowledge.bigenius-x.com/sensitivity-level-tag-name-project?hsLang=en): `sensitivity_level`
- [Hash Algorithm](https://knowledge.bigenius-x.com/hash-algorithm-project?hsLang=en): `SHA-256`
- [Hash Casing](https://knowledge.bigenius-x.com/hash-casing-project?hsLang=en): `None`; also `Upper` and `Lower`
- [Hash Concatenation Separator](https://knowledge.bigenius-x.com/hash-concatenation-separator-project?hsLang=en): `_`
- [Hash Null Placeholder](https://knowledge.bigenius-x.com/hash-null-placeholder-project?hsLang=en): `_NULL_`
- [Hash Trim](https://knowledge.bigenius-x.com/hash-trim-project?hsLang=en): off
- [Begin of Universe](https://knowledge.bigenius-x.com/begin-of-universe-project?hsLang=en): `1900-01-01`
- [End of Universe](https://knowledge.bigenius-x.com/end-of-universe-project?hsLang=en): `9999-12-31`
- [Persist Validity](https://knowledge.bigenius-x.com/persist-validity-project?hsLang=en): on
- [Create Result Views](https://knowledge.bigenius-x.com/create-result-views-project?hsLang=en): off
- [Target Object Comment Type](https://knowledge.bigenius-x.com/target-object-comment-type-project?hsLang=en): `None`; also `Tables and Views`
- [Use Unique Constraints](https://knowledge.bigenius-x.com/use-unique-constraints-project?hsLang=en): on

Model object properties: [Custom Singleton Values](https://knowledge.bigenius-x.com/custom-singleton-values-model-object?hsLang=en), [Delta Detection](https://knowledge.bigenius-x.com/delta-detection-model-object?hsLang=en), [Version Valid From Term](https://knowledge.bigenius-x.com/validfrom-source-term-dataflow-model-object?hsLang=en), Fact Load Strategy, [Deduplication Method](https://knowledge.bigenius-x.com/deduplication-method-model-object?hsLang=en), [Sort Order within Partition](https://knowledge.bigenius-x.com/deduplication-partition-model-object?hsLang=en), Foreign Key Mode, [Implementation Type](https://knowledge.bigenius-x.com/implementation-type-model-object?hsLang=en), [File Format](https://knowledge.bigenius-x.com/file-format-model-object?hsLang=en) (`delta`), [Optimization Method](https://knowledge.bigenius-x.com/optimization-method-model-object?hsLang=en) and [Optimization Method Columns](https://knowledge.bigenius-x.com/optimization-method-columns-model-object?hsLang=en).

### Platform differences

Compared with Databricks - Datamart of the same release:

- Output: a dbt project with SQL models instead of PySpark notebooks and deployment scripts.
- Loading: dbt runs the models; there is no load control and no Apache Airflow option.
- Create Result Views: off by default; on by default in Databricks - Datamart.
- Foreign Key Mode: also shown on Mart Dimension, Mart Composite, Mart Hierarchy Flatten and Mart Out, where it has no effect.
- Target Object Comment Type: no value `Tables`.
- Unity Catalog: always used; Databricks - Datamart has the property Use Unity Catalog.

### Example

A Mart Fact `load_insert_with_effective_timestamp` with the Fact Load Strategy `Insert` references the Mart Dimension `common_pos` through the business key term `POS_ID`. With Create Result Views off, the model `dm_mf_load_insert_with_effective_timestamp` looks up the surrogate key in the dimension table. Excerpt of the model SQL:

```
    ,COALESCE(`r1`.`common_pos_sk`, -1) AS `common_pos_common_pos_sk`
FROM {{ ref('dm_mf_load_insert_with_effective_timestamp_source') }}
    AS `bg_source`
LEFT OUTER JOIN {{ ref('dm_md_common_pos') }} AS `r1`
   ON (`r1`.`pos_id` =
       `bg_source`.`fk_common_pos_common_pos_pos_id`)
```

Excerpt of `models/mart/models_mart.yml` with the foreign key that Foreign Key Mode `Create Disabled` adds:

```
  - name: dm_mf_load_insert_with_effective_timestamp
    constraints:
      - type: foreign_key
        columns: [common_pos_common_pos_sk]
        to: ref('dm_md_common_pos')
        to_columns: [common_pos_sk]
```

The excerpt leaves out the constraint name and `warn_unsupported: false`. With Create Result Views on, the lookup reads `ref('dm_md_common_pos_result')` instead.

### Release differences

Project Settings shows the Generator Version of your project.

- Generator 2.2: first release after the preview in Generator 2.1. Compared with the preview: Create Result Views, default off; the Foreign Key Mode value `Create Disabled` with primary key and foreign key constraints; the incremental read filter on `BG_LoadTimestamp`.
- Generator 2.3: the catalog and schema of each linked source system are variables in `dbt_project.yml`; the model object property Custom Singleton Values; a fix of the Mart Out deduplication. See [Generators Release - 2.3.0](https://knowledge.bigenius-x.com/generators-release-2.3.0?hsLang=en).
- Generator 2.4: Non-Historized Satellite and Non-Historized Business Satellite as linked objects; Use Unique Constraints; the materializations apply the constraints; table columns use the modeled data types. See [Generators Release - 2.4.0](https://knowledge.bigenius-x.com/generators-release-2.4.0?hsLang=en).

### Related articles

- Previous: [Import a Project to be used as a Linked Project](https://knowledge.bigenius-x.com/import-a-project-to-be-used-as-a-linked-project?hsLang=en), [Databricks dbt - Target environment](https://knowledge.bigenius-x.com/databricks-dbt-target-environment?hsLang=en)
- Next: [Generate artifacts](https://knowledge.bigenius-x.com/generate-artifacts?hsLang=en), [dbt - Placeholder values](https://knowledge.bigenius-x.com/dbt-placeholder-values?hsLang=en), [dbt - Deployment](https://knowledge.bigenius-x.com/dbt-deployment?hsLang=en)
- Reference: [dbt - Artifacts](https://knowledge.bigenius-x.com/dbt-artifacts?hsLang=en), [Foreign Key Mode (Model Object)](https://knowledge.bigenius-x.com/foreign-key-mode-model-object?hsLang=en), [Implementation Type (Model Object)](https://knowledge.bigenius-x.com/implementation-type-model-object?hsLang=en), [Create Result Views (Project)](https://knowledge.bigenius-x.com/create-result-views-project?hsLang=en), [Persist Validity (Project)](https://knowledge.bigenius-x.com/persist-validity-project?hsLang=en), [Use Unique Constraints (Project)](https://knowledge.bigenius-x.com/use-unique-constraints-project?hsLang=en), [Fact Load Strategy (Dataflow)](https://knowledge.bigenius-x.com/fact-load-strategy-dataflow?hsLang=en)
- See also: [Available Generator Configurations](https://knowledge.bigenius-x.com/available-generator-configurations?hsLang=en), [Source Systems per Generator Configurations](https://knowledge.bigenius-x.com/source-systems-per-generator-configurations?hsLang=en), [Databricks - Datamart](https://knowledge.bigenius-x.com/databricks-datamart-2.0?hsLang=en), [Databricks dbt - DataVault](https://knowledge.bigenius-x.com/databricks-dbt-datavault?hsLang=en), [Export a Project to be used as a Linked Project](https://knowledge.bigenius-x.com/export-a-project-to-be-used-as-linked-project?hsLang=en), [Databricks dbt - DataVault and Mart](https://knowledge.bigenius-x.com/databricks-dbt-datavault-and-mart?hsLang=en)

- [Getting started](https://knowledge.bigenius-x.com/getting-started?hsLang=en#main-content)

    - [Guidelines](https://knowledge.bigenius-x.com/getting-started?hsLang=en#guidelines)
    - [Start working](https://knowledge.bigenius-x.com/getting-started?hsLang=en#start-working)
    - [Account](https://knowledge.bigenius-x.com/getting-started?hsLang=en#account)
- [General overview](https://knowledge.bigenius-x.com/general-overview?hsLang=en)
- [Artificial Intelligence](https://knowledge.bigenius-x.com/artificial-intelligence?hsLang=en)
- [Application Modules](https://knowledge.bigenius-x.com/application-modules?hsLang=en#main-content)

    - [Administration](https://knowledge.bigenius-x.com/application-modules?hsLang=en#administration)
    - [Solutions](https://knowledge.bigenius-x.com/application-modules?hsLang=en#solutions)
    - [Global Features](https://knowledge.bigenius-x.com/application-modules?hsLang=en#global-features)
    - [Projects](https://knowledge.bigenius-x.com/application-modules?hsLang=en#projects)
    - [Branches](https://knowledge.bigenius-x.com/application-modules?hsLang=en#branches)
    - [Data Connections](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-connections)
    - [Dataflow Modeling - Overview](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-overview)
    - [Dataflow Modeling - Wizard Steps](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-wizard-steps)
    - [Dataflow Modeling - Terms](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-terms)
    - [Dataflow Modeling - Term Mapping](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-term-mapping)
    - [Dataflow Modeling - Relationships](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-relationships)
    - [Dataflow Modeling - Data Quality](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-data-quality)
    - [Dataflow Modeling - Indexes](https://knowledge.bigenius-x.com/application-modules?hsLang=en#dataflow-modeling-indexes)
    - [Relationship Modeling](https://knowledge.bigenius-x.com/application-modules?hsLang=en#relationship-modeling)
    - [Generate Artifacts](https://knowledge.bigenius-x.com/application-modules?hsLang=en#generate-artifacts)
    - [Project Settings](https://knowledge.bigenius-x.com/application-modules?hsLang=en#project-settings)
    - [Data Marketplace](https://knowledge.bigenius-x.com/application-modules?hsLang=en#data-marketplace)
- [Generators](https://knowledge.bigenius-x.com/generators?hsLang=en#main-content)

    - [Fabric Warehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-warehouse)
    - [Fabric Lakehouse](https://knowledge.bigenius-x.com/generators?hsLang=en#fabric-lakehouse)
    - [Databricks](https://knowledge.bigenius-x.com/generators?hsLang=en#databricks)
    - [Snowflake](https://knowledge.bigenius-x.com/generators?hsLang=en#snowflake)
    - [Microsoft SQL Server](https://knowledge.bigenius-x.com/generators?hsLang=en#microsoft-sql-server)
    - [Oracle](https://knowledge.bigenius-x.com/generators?hsLang=en#oracle)
    - [Artifacts](https://knowledge.bigenius-x.com/generators?hsLang=en#artifacts)
    - [Replace Placeholders](https://knowledge.bigenius-x.com/generators?hsLang=en#replace-placeholders)
    - [Target solution environment](https://knowledge.bigenius-x.com/generators?hsLang=en#target-solution-environment)
    - [Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment)
    - [Deployment with an Azuze DevOps pipeline](https://knowledge.bigenius-x.com/generators?hsLang=en#deployment-with-an-azuze-devops-pipeline)
    - [Delta Deployment](https://knowledge.bigenius-x.com/generators?hsLang=en#delta-deployment)
    - [Load control environment](https://knowledge.bigenius-x.com/generators?hsLang=en#load-control-environment)
    - [Load data with a native load control](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-a-native-load-control)
    - [Load data with Apache Airflow](https://knowledge.bigenius-x.com/generators?hsLang=en#load-data-with-apache-airflow)
    - [Model Object Type](https://knowledge.bigenius-x.com/generators?hsLang=en#model-object-type)
    - [Properties](https://knowledge.bigenius-x.com/generators?hsLang=en#properties)
    - [Default Terms](https://knowledge.bigenius-x.com/generators?hsLang=en#default-terms)
- [Discovery application](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#main-content)

    - [Discovery configurations](https://knowledge.bigenius-x.com/discovery-application?hsLang=en#discovery-configurations)
- [Best practices](https://knowledge.bigenius-x.com/best-practices?hsLang=en#main-content)

    - [Modeling Approaches](https://knowledge.bigenius-x.com/best-practices?hsLang=en#modeling-approaches)
    - [Use Cases](https://knowledge.bigenius-x.com/best-practices?hsLang=en#use-cases)
    - [Business Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#business-rules)
    - [Data Quality Rules](https://knowledge.bigenius-x.com/best-practices?hsLang=en#data-quality-rules)
- [FAQs](https://knowledge.bigenius-x.com/faqs?hsLang=en)
- [Product Release Notes](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#main-content)

    - [SaaS Application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#saas-application)
    - [Discovery application](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#discovery-application)
    - [Generators](https://knowledge.bigenius-x.com/product-release-notes?hsLang=en#generators)
- [Legal Documents](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#main-content)

    - [Current legal docs](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#current-legal-docs)
    - [Software Product and Limits](https://knowledge.bigenius-x.com/legal-documents?hsLang=en#software-product-and-limits)

- [Contact us](https://knowledge.bigenius-x.com/kb-tickets/new?hsLang=en)
- [Customer Portal](https://knowledge.bigenius-x.com/customer-portal)
- [Sign in](https://knowledge.bigenius-x.com/_hcms/mem/login)

[![biGENIUS logo](https://knowledge.bigenius-x.com/hubfs/TRI_Logo_biGENIUS_2020_RGB-1.svg "biGENIUS logo")](https://www.bigenius-x.com)

<https://www.linkedin.com/company/bigenius> <https://www.youtube.com/@biGENIUS_DWA>

All rights reserved © 2025, biGENIUS AG