Skip to content

dbt

Atlan University

See it in action in our automated enrichment course (45 mins).

You can use dbt's meta field to enrich metadata resources from dbt into Atlan. Atlan will ingest the information from this field and update the assets in Atlan accordingly.

With this, you have a powerful way to keep the dbt assets documented directly as part of your dbt work.

The following is an example:

dbt example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: 2
models:
  - name: customers
    description: >- # (1)
      This table has basic information about a customer, as well as some derived
      facts based on a customer's orders.
    meta: # (2)
      atlan: # (3)
        attributes: # (4)
          certificateStatus: DRAFT
          ownerUsers: ["bryan", "ashwin"]
        classifications: # (5)
          - typeName: "ipubxAPPb0zRcNU1Gkjs9b"
            propagate: true
            removePropagationsOnEntityDelete: true
            restrictPropagationThroughLineage: true
            restrictPropagationThroughHierarchy: false

    columns:
      - name: customer_id
        description: This is a unique identifier for a customer
        tests:
          - unique
          - not_null
      - name: total_order_amount
        description: Total value (AUD) of a customer's orders.
      - name: customer_lifetime_value
        meta: # (6)
          atlan:
            attributes:
              description: Customer lifetime value.
              certificateStatus: DRAFT
              ownerUsers: ["ravi"]
            classifications:
              - typeName: "ipubxAPPb0zRcNU1Gkjs9b"
                propagate: true
                removePropagationsOnEntityDelete: true
  1. The description at the top level of an asset defined in dbt will already be mapped to the description field for that asset in Atlan.
  2. More detailed metadata, however, needs to be specified within the meta field.
  3. ... and within the meta field, further within the atlan sub-field.
  4. For attributes, such as certificates, announcements, or owners these need to be specified within the attributes sub-field.
  5. Classifications need to be specified within a classifications sub-field.
  6. Note that the meta field and its sub-structure (including all the detailed attributes) can also be applied to columns within a model.

This rich metadata will then be loaded to the corresponding attributes on the asset in Atlan.

For more details on specific examples, see the dbt tabs in the Common asset actions snippets.