dbt Cloud
The dbt Cloud integration synchronizes your dbt metadata into the lineage graph.
Web App
 
Fields
| Field | Value | Example | 
|---|---|---|
| source | The name of the source, see sources | my-source | 
| Name | Name for connection | dbt Cloud | 
| Namespace | Namespace for the connection, see namespace | default | 
| api_key | dbt Cloud api key, see api key | 
ApiKey
Follow https://docs.getdbt.com/docs/dbt-cloud-apis/user-tokens (opens in a new tab) to generate an api key.
Python Library
The dbt integration can be run as a standalone python library to extract data lineage from the dbt cloud api.
The library is available via pip
pip install grai_source_dbt_cloudMore information about the API is available here.
Example
The library is split into a few distinct functions but if you only wish to extract nodes/edges from dbt you can do so as follows:
  from grai_source_dbt_cloud import DbtCloudIntegration
  from grai_schemas.v1.source import SourceV1
 
  source = SourceV1(name="my-source", type="my-type")
 
  integration = DbtCloudIntegration(source=source, namespace="dbt", api_key="my-api-key")
 
  nodes, edges = integration.get_nodes_and_edges()