Skip to main content

Connecting to dbt Cloud

Supported versions​

Dataedo’s dbt connector works with both dbt Core and dbt Cloud starting from version v1.0. The connector is platform-agnostic, so you can use it with any warehouse supported by dbt - Snowflake, BigQuery, Redshift, and more. For the lineage support, make sure that the warehouse is connected to Dataedo as well.

Prepare for import​

Dataedo needs two dbt artifacts to import metadata:

  • manifest.json - must come from a dbt command that also compiles your models,
  • catalog.json - produced by dbt docs generate command.

See below for details on how to generate or retrieve these files.

Generate the dbt docs artifacts​

To let Dataedo import metadata from dbt Cloud, make sure your job has Generate docs on run enabled. For details, see the dbt Cloud docs.

caution

Adding a manual dbt docs generate command will not help—Dataedo ignores that step. What matters is that the Generate docs on run checkbox is ticked in the job settings.

useful tip

Ideally, enable Generate docs on run in your main production job (the one that materializes your models). If you prefer a separate docs-only job, schedule it immediately after the main run so the models already exist; otherwise the generated docs—and thus the import may be incomplete.

Locate the Administrative API endpoint​

Dataedo needs the administrative API endpoint of your dbt Cloud instance. You can copy it from the Settings page or straight from the browser’s address bar:

See the dbt Cloud Admin API docs for reference.

Create an authentication token​

You can authenticate with either of the following:

Required permissions​

Dataedo calls these administrative API endpoints to retrieve metadata:

Access to these endpoints typically requires the Job Admin permission set. For enterprise environments, the Job Viewer permission set may also provide sufficient access, although this configuration has not been formally verified.

Importing Metadata in Dataedo Portal​

Entry point​

To start the Metadata Import flow, make sure you have the Connection Manager role. Go to Connections and click Add connection, then pick dbt from the connector list to open the import wizard described in the following steps.

Add connection

Step 1. Host details​

Provide the name of the Connection and an optional description, then choose dbt Cloud as Import type and fill in the Endpoint - the URL of your dbt Cloud instance, for example https://ab123.us1.dbt.com/. See Locate the Administrative API endpoint above for how to find it.

info

A Connection in Dataedo represents a saved configuration for accessing a data source.
It can be reused for future imports and scheduling.

Host details

Advanced settings is optional — you can leave it collapsed and the connection will run on any available agent with the global timeouts. Expand it if you want to restrict the connection to a specific agent or override the task timeouts.

Step 2. Credentials​

Choose credentials from the list of existing ones available for the selected connector, or add new credentials. dbt Cloud uses a Token - your Personal Access Token or Service Account Token; see Create an authentication token above.

Credentials

Step 3. Connection info​

Select the Account that has access to the project and job you want to import metadata from. Dataedo lists the accounts the token can reach, each with its account ID.

Connection info

Step 4. Data Sources​

Dataedo lists the jobs available in the account, prefixed with the project they belong to, so you can tell them apart. Pick the job with the Generate docs on run option enabled - see Generate the dbt docs artifacts above. Give the selected source a Display name, which will be visible in Dataedo.

Data sources

Step 5. Objects to import​

For each schema found in the project, you can choose which object types to import - Models, Sources and Structures. Select Future Schemas to include schemas added to the project after this import as well.

Objects to import

Use Advanced filters to include or exclude objects by name pattern and object type instead.

Advanced filters

Step 6. Linked sources (optional)​

dbt lineage depends on linked sources - they tell Dataedo which documentation in the repository represents each database referenced by the project. This step lists the referencing sources detected in the artifacts so you can map them during the import instead of afterwards.

To learn what the individual linked sources mean and which documentation each one should point to, see After the first import - activate automatic lineage below.

Linked sources

Step 7. Schedule​

Configure the Metadata Import task for the source:

  • choose the data lineage options (Build lineage, Parse SQL) and metadata extraction options (Append only, Reimport all included objects)
  • run daily, on selected weekdays, or on specific days of the month
  • choose an exact time of execution
  • Task state:
    • Active - the task will run as scheduled
    • Draft - the task is saved but not executed until you switch it to Active
  • Run Immediately - when checked, the task will also be executed right after you click Create connection
Add Import Metadata task

Once saved, the task appears next to its source in the schedule list.

Schedule with a defined task
caution

You must configure at least one import task in the schedule section.
If you skip this, an empty database will be created and no metadata will be imported.


Importing Metadata in Dataedo Desktop​

Choose dbt Cloud as Import type and fill in the following fields:

  • Endpoint - the URL of your dbt Cloud instance (e.g., https://cloud.getdbt.com/, https://{account_prefix}.us1.dbt.com/, https://emea.dbt.com/) - see section above for more information.
  • Token - your Personal Access Token or Service Account Token - see section above for more information.
  • Account - name of the dbt Cloud account with access to the project and job you want to import metadata from.
  • Job - name of the job with 'Generate docs on run' option enabled - see section above for more information. To make the choice easier, the job name is prefixed with information about the project it belongs to.
Dataedo reads the job's latest artifacts

Dataedo always downloads the job's artifacts from the most recent run that produced them - you cannot point it at an older run. So if objects or lineage look out of date, check when the job last ran, re-run it, and only then run Import changes in Dataedo.

After the first import - activate automatic lineage​

lineage is empty after the first import

The initial import brings in objects and descriptions, but lineage is empty until you set up the Linked sources and run Import changes. Follow the steps below to create automatic lineage.

What is a linked source?​

A linked source identifies which documentation set inside Dataedo represents a particular external system. By mapping it, you remove the ambiguity that appears when identical object names exist in several documentations—Dataedo now knows exactly where to look to resolve cross-database lineage.

more background

Need more context? See the Linked sources overview.

In dbt, Dataedo creates three kinds of linked sources:

Linked source typeWhen it is createdName in Dataedo
ProjectAlways. Represents the whole dbt project.Always Project warehouse
SeedOnly if the project contains seeds.Always Seeds
SourceOne per source defined in your dbt project.Same as the source name in dbt.

Map each linked source to the right database​

Linked-source typeMap it to documentation that represents…
ProjectThe database where dbt models (and seeds) are materialized.
SeedThe database that holds the seed .csv files, not the database where the seeds are materialized.
SourceThe upstream database referenced by that specific source in dbt.

For step-by-step instructions on assigning a linked source to a documentation set, see the overview.

how many documentations to assign

A linked source can point to several documentations - for instance, if you imported the same database multiple times, but one schema at a time. In most scenarios, though, you will connect each linked source to a single documentation.

Run Import changes​

After you assign the linked sources, run Import changes to populate the lineage. Dataedo will now automatically create the lineage.

keep linked sources up to date

Remember to update the linked sources whenever you add/update the sources in your dbt project. The automatic data lineage feature only works if the linked sources are up to date.

Import dbt Cloud without internet access​

If your Dataedo instance does not have internet access, you can still import dbt Cloud metadata. To do this, you need to download manifest.json and catalog.json manually and then import them into Dataedo using dbt Core (artifacts from path) connection type.

download the artifacts from a run that generated docs

Make sure to download both files from a run of a job with Generate docs on run enabled - see Generate the dbt docs artifacts. A run without it does not produce a full set of artifacts.

Dataedo is an end-to-end data governance solution for mid-sized organizations.
Data Lineage • Data Quality • Data Catalog