> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Run dbt Workflow Externally | OpenMetadata Guide

> Run dbt workflows externally to sync metadata from CI/CD systems or scheduled orchestrations.

![dbt](https://docs.open-metadata.org/public/images/connectors/dbt.webp)

# dbt

PROD

In this section, we provide guides and references to run the dbt workflow externally.

* [Requirements](#requirements)
* [Python Requirements](#python-requirements)
* [dbt Ingestion](#dbt-ingestion)
* [Run with the CLI](#2-run-with-the-cli)

## How to Run the Connector Externally

To run the Ingestion via the UI you'll need to use the OpenMetadata Ingestion Container, which comes shipped with
custom Airflow plugins to handle the workflow deployment.

If, instead, you want to manage your workflows externally on your preferred orchestrator, you can check
the following docs to run the Ingestion Framework **anywhere**.

> [card] [External Schedulers](https://docs.open-metadata.org/v2.1.x/deployment/ingestion.md)
>
> Get more information about running the Ingestion Framework Externally

## Requirements

You must have access to dbt artifacts. At minimum, the `manifest.json` file is required. The `catalog.json` and `run_results.json` files are optional but recommended for richer metadata.

For dbt Cloud, create a service token with the `Account Viewer` permission and collect the account, project, and job IDs if you want to target a specific run.

## Python Requirements

Use Python 3.10 or later. Python 3.12 is recommended, because it is what the OpenMetadata 2.0 ingestion images use. To confirm the supported range for your release, check the `Requires-Python` metadata of that release’s `openmetadata-ingestion` package.

To run the dbt ingestion, install:

```bash theme={null}
pip3 install "openmetadata-ingestion[dbt]"
```

## dbt Ingestion

All connectors are defined as JSON Schemas. You can find the structure for dbt workflows in the OpenMetadata spec repository.

### 1. Define the YAML Config

Choose one of the following dbt artifact sources:

* [AWS S3 Buckets](#1-dbt-core-aws-s3-buckets)
* [Google Cloud Storage Buckets](#2-dbt-core-google-cloud-storage-buckets)
* [Azure Storage Buckets](#3-dbt-core-azure-storage-buckets)
* [Local Storage](#4-dbt-core-local-storage)
* [File Server](#5-dbt-core-file-server)
* [dbt Cloud](#6-dbt-cloud-api-based-ingestion)

### 1. dbt Core: AWS S3 Buckets

In this configuration we fetch dbt artifacts from an S3 bucket.

#### Source Configuration

Configure the source type and service name for your dbt workflow.

#### dbt Config Source

Set `dbtConfigType` to `s3` and provide AWS credentials or a region.

AWS Access Key Credentials

**awsAccessKeyId** and **awsSecretAccessKey** are used to authenticate and authorize programmatic requests to AWS services.

An access key consists of:

* **Access Key ID** (for example, `AKIAIOSFODNN7EXAMPLE`)
* **Secret Access Key** (for example, `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`)

Both values must be provided together when using static credentials.

For more information, see
[Managing access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).

AWS Session Token

**awsSessionToken** is required when using **temporary security credentials**, such as those obtained via AWS STS.

The session token must be provided along with the access key ID and secret access key for the duration of the session.

AWS Region

**awsRegion** specifies the AWS Region where the target service is deployed (for example, `us-east-1`).

This is the **only required parameter** when configuring an AWS connection. Other credentials can be resolved automatically using environment variables, AWS profiles, or IAM roles.

Learn more in the
[AWS Regions and Availability Zones documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html).

Custom Endpoint URL

**endPointURL** is an optional custom endpoint used to connect to an AWS service.

You may want to specify this when:

* Using VPC endpoints
* Connecting to local or AWS-compatible services
* Overriding the default regional endpoint

See
[AWS service endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html) for details.

AWS Profile Name

**profileName** specifies the AWS CLI profile to use for authentication.

Profiles store credentials and configuration in AWS config files.
If not specified, the `default` profile is used.

Learn more about
[Named profiles for the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html).

Assume Role ARN

**assumeRoleArn** is the Amazon Resource Name (ARN) of the IAM role to assume.

This is commonly used for:

* Cross-account access
* Delegated permissions
* Enhanced security setups

This field is **required** when using Assume Role authentication.

See the
[AssumeRole API reference](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html).

Assume Role Session Name

**assumeRoleSessionName** identifies the assumed role session.

This value helps uniquely identify a session when the same role is assumed multiple times or by different principals.

If not provided, the default value `OpenMetadataSession` is used.

Assume Role Source Identity

**assumeRoleSourceIdentity** is an optional source identity passed when assuming a role.

This value is recorded in AWS CloudTrail logs and can be used to trace actions performed using the assumed role.

See
[Source Identity in AssumeRole](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html).

#### dbt Prefix Configuration

**dbtPrefixConfig**: Optional config to specify the bucket name and directory path where the dbt files are stored. If config is not provided ingestion will scan all the buckets for dbt files.

**dbtBucketName**: Name of the bucket where the dbt files are stored.

**dbtObjectPrefix**: Path of the folder where the dbt files are stored.

Follow the documentation [here](https://docs.open-metadata.org/connectors/database/dbt/setup-multiple-dbt-projects) to configure multiple dbt projects

#### Source Config

* **dbtUpdateDescriptions**: Configuration to update the description from dbt or not. If set to true, descriptions from dbt will override the already present descriptions on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-descriptions).
* **dbtUpdateOwners**: Configuration to update the owner from dbt or not. If set to true, owners from dbt will override the already present owners on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-owner).
* **includeTags**: Set to `true` or `false` to ingest tags from dbt. Default is `true`.
* **dbtClassificationName**: Custom OpenMetadata Classification name for dbt tags.
* **catalogMapping**: Map of database names in the dbt manifest to the database names they are ingested under in OpenMetadata. Use it when the name dbt writes into the manifest differs from the name the connector ingested. Keys are matched ignoring case. For more information, see [Map dbt Catalog Names to OpenMetadata Databases](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-lineage#map-dbt-catalog-names-to-openmetadata-databases).
* **databaseFilterPattern**, **schemaFilterPattern**: Add filters to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/database).
* **tableFilterPattern**: Add a filter to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/table).

#### Sink Configuration

To send the metadata to OpenMetadata, it needs to be specified as `type: metadata-rest`.

#### Workflow Configuration

The main property here is `openMetadataServerConfig`, where you can define the host and security provider of your OpenMetadata installation.

* **loggerLevel**: Specify the logger level depending on your needs. If you are troubleshooting an ingestion, use `DEBUG` for more detailed traces.
* **JWT token**: JWT tokens allow clients to authenticate against the OpenMetadata server. See [Enable JWT Tokens](https://docs.open-metadata.org/deployment/security/enable-jwt-tokens) and [JWT Troubleshooting](https://docs.open-metadata.org/deployment/security/jwt-troubleshooting) for more information.
* **storeServiceConnection**: If set to `true` (default), sensitive information is stored encrypted with the Fernet Key or externally if you have configured a [Secrets Manager](https://docs.open-metadata.org/deployment/secrets-manager). If set to `false`, the service is created, but the service connection information is only used by the Ingestion Framework at runtime and is not sent to the OpenMetadata server.
* **SSL configuration**: If you have added SSL to the [OpenMetadata server](https://docs.open-metadata.org/deployment/security/enable-ssl), configure the certificates for ingestion. Set `verifySSL` to `ignore`, or set it to `validate` and provide `sslConfig.caCertificate` with a local path to the server certificate. See [SSL Troubleshooting](https://docs.open-metadata.org/deployment/security/enable-ssl/ssl-troubleshooting) for more information.
* **ingestionPipelineFQN**: Fully qualified name of the ingestion pipeline, used to identify the current ingestion pipeline.

dbt\_config.yaml
Copy full code

```yaml theme={null}
source:
  type: dbt
  serviceName: service_name
  sourceConfig:
    config:
      type: DBT
      dbtConfigSource:
        dbtConfigType: s3
        dbtSecurityConfig:
          awsConfig:
            awsRegion: us-east-2
```

```yaml theme={null}
         awsAccessKeyId: KEY
         awsSecretAccessKey: SECRET
```

```yaml theme={null}
        # awsSessionToken: TOKEN
```

```yaml theme={null}
         awsRegion: us-east-2
```

```yaml theme={null}
        # endPointURL: https://athena.us-east-2.amazonaws.com/custom
```

```yaml theme={null}
        # profileName: profile
```

```yaml theme={null}
        # assumeRoleArn: "arn:partition:service:region:account:resource"
```

```yaml theme={null}
        # assumeRoleSessionName: session
```

```yaml theme={null}
        # assumeRoleSourceIdentity: identity
```

```yaml theme={null}
        dbtPrefixConfig:
          dbtBucketName: bucket_name
          dbtObjectPrefix: main_dir/dbt_files/
```

```yaml theme={null}
      # dbtUpdateDescriptions: true or false
      # dbtUpdateOwners: true or false
      # includeTags: true or false
      # dbtClassificationName: dbtTags
      # catalogMapping:
      #   bq_catalog: my-gcp-project
      # databaseFilterPattern:
      #   includes:
      #     - .*db.*
      #   excludes:
      #     - .*demo.*
      # schemaFilterPattern:
      #   includes:
      #     - .*schema.*
      #   excludes:
      #     - .*demo.*
      # tableFilterPattern:
      #   includes:
      #     - .*table.*
      #   excludes:
      #     - .*demo.*
```

```yaml theme={null}
sink:
  type: metadata-rest
  config: {}
```

```yaml theme={null}
workflowConfig:
  loggerLevel: INFO  # DEBUG, INFO, WARNING or ERROR
  openMetadataServerConfig:
    hostPort: "http://localhost:8585/api"
    authProvider: openmetadata
    securityConfig:
      jwtToken: "{bot_jwt_token}"
    ## Store the service Connection information
    storeServiceConnection: true  # false
    ## Secrets Manager Configuration
    # secretsManagerProvider: aws, azure or noop
    # secretsManagerLoader: airflow or env
    ## If SSL, fill the following
    # verifySSL: validate  # or ignore
    # sslConfig:
    #   caCertificate: /local/path/to/certificate
# ingestionPipelineFQN: <service name>.<ingestion name> ## e.g., "my_redshift.metadata"
```

### 2. dbt Core: Google Cloud Storage Buckets

In this configuration we fetch dbt artifacts from a GCS bucket.

#### Source Configuration

Configure the source type and service name for your dbt workflow.

#### dbt Config Source

Set `dbtConfigType` to `gcs` and provide either a credentials file path or inline credentials.

#### dbt Prefix Configuration

**dbtPrefixConfig**: Optional config to specify the bucket name and directory path where the dbt files are stored. If config is not provided ingestion will scan all the buckets for dbt files.

**dbtBucketName**: Name of the bucket where the dbt files are stored.

**dbtObjectPrefix**: Path of the folder where the dbt files are stored.

Follow the documentation [here](https://docs.open-metadata.org/connectors/database/dbt/setup-multiple-dbt-projects) to configure multiple dbt projects

#### Source Config

* **dbtUpdateDescriptions**: Configuration to update the description from dbt or not. If set to true, descriptions from dbt will override the already present descriptions on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-descriptions).
* **dbtUpdateOwners**: Configuration to update the owner from dbt or not. If set to true, owners from dbt will override the already present owners on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-owner).
* **includeTags**: Set to `true` or `false` to ingest tags from dbt. Default is `true`.
* **dbtClassificationName**: Custom OpenMetadata Classification name for dbt tags.
* **catalogMapping**: Map of database names in the dbt manifest to the database names they are ingested under in OpenMetadata. Use it when the name dbt writes into the manifest differs from the name the connector ingested. Keys are matched ignoring case. For more information, see [Map dbt Catalog Names to OpenMetadata Databases](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-lineage#map-dbt-catalog-names-to-openmetadata-databases).
* **databaseFilterPattern**, **schemaFilterPattern**: Add filters to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/database).
* **tableFilterPattern**: Add a filter to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/table).

#### Sink Configuration

To send the metadata to OpenMetadata, it needs to be specified as `type: metadata-rest`.

#### Workflow Configuration

The main property here is `openMetadataServerConfig`, where you can define the host and security provider of your OpenMetadata installation.

* **loggerLevel**: Specify the logger level depending on your needs. If you are troubleshooting an ingestion, use `DEBUG` for more detailed traces.
* **JWT token**: JWT tokens allow clients to authenticate against the OpenMetadata server. See [Enable JWT Tokens](https://docs.open-metadata.org/deployment/security/enable-jwt-tokens) and [JWT Troubleshooting](https://docs.open-metadata.org/deployment/security/jwt-troubleshooting) for more information.
* **storeServiceConnection**: If set to `true` (default), sensitive information is stored encrypted with the Fernet Key or externally if you have configured a [Secrets Manager](https://docs.open-metadata.org/deployment/secrets-manager). If set to `false`, the service is created, but the service connection information is only used by the Ingestion Framework at runtime and is not sent to the OpenMetadata server.
* **SSL configuration**: If you have added SSL to the [OpenMetadata server](https://docs.open-metadata.org/deployment/security/enable-ssl), configure the certificates for ingestion. Set `verifySSL` to `ignore`, or set it to `validate` and provide `sslConfig.caCertificate` with a local path to the server certificate. See [SSL Troubleshooting](https://docs.open-metadata.org/deployment/security/enable-ssl/ssl-troubleshooting) for more information.
* **ingestionPipelineFQN**: Fully qualified name of the ingestion pipeline, used to identify the current ingestion pipeline.

dbt\_config.yaml
Copy full code

```yaml theme={null}
source:
  type: dbt
  serviceName: service_name
  sourceConfig:
    config:
      type: DBT
      dbtConfigSource:
        dbtConfigType: gcs
        dbtSecurityConfig:
          gcpConfig:
            gcpCredentialsPath: /path/to/service-account.json
```

```yaml theme={null}
        dbtPrefixConfig:
          dbtBucketName: bucket_name
          dbtObjectPrefix: main_dir/dbt_files/
```

```yaml theme={null}
      # dbtUpdateDescriptions: true or false
      # dbtUpdateOwners: true or false
      # includeTags: true or false
      # dbtClassificationName: dbtTags
      # catalogMapping:
      #   bq_catalog: my-gcp-project
      # databaseFilterPattern:
      #   includes:
      #     - .*db.*
      #   excludes:
      #     - .*demo.*
      # schemaFilterPattern:
      #   includes:
      #     - .*schema.*
      #   excludes:
      #     - .*demo.*
      # tableFilterPattern:
      #   includes:
      #     - .*table.*
      #   excludes:
      #     - .*demo.*
```

```yaml theme={null}
sink:
  type: metadata-rest
  config: {}
```

```yaml theme={null}
workflowConfig:
  loggerLevel: INFO  # DEBUG, INFO, WARNING or ERROR
  openMetadataServerConfig:
    hostPort: "http://localhost:8585/api"
    authProvider: openmetadata
    securityConfig:
      jwtToken: "{bot_jwt_token}"
    ## Store the service Connection information
    storeServiceConnection: true  # false
    ## Secrets Manager Configuration
    # secretsManagerProvider: aws, azure or noop
    # secretsManagerLoader: airflow or env
    ## If SSL, fill the following
    # verifySSL: validate  # or ignore
    # sslConfig:
    #   caCertificate: /local/path/to/certificate
# ingestionPipelineFQN: <service name>.<ingestion name> ## e.g., "my_redshift.metadata"
```

### 3. dbt Core: Azure Storage Buckets

In this configuration we fetch dbt artifacts from Azure Storage.

#### Source Configuration

Configure the source type and service name for your dbt workflow.

#### dbt Config Source

Set `dbtConfigType` to `azure` and provide Azure AD credentials.

#### dbt Prefix Configuration

**dbtPrefixConfig**: Optional config to specify the bucket name and directory path where the dbt files are stored. If config is not provided ingestion will scan all the buckets for dbt files.

**dbtBucketName**: Name of the bucket where the dbt files are stored.

**dbtObjectPrefix**: Path of the folder where the dbt files are stored.

Follow the documentation [here](https://docs.open-metadata.org/connectors/database/dbt/setup-multiple-dbt-projects) to configure multiple dbt projects

#### Source Config

* **dbtUpdateDescriptions**: Configuration to update the description from dbt or not. If set to true, descriptions from dbt will override the already present descriptions on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-descriptions).
* **dbtUpdateOwners**: Configuration to update the owner from dbt or not. If set to true, owners from dbt will override the already present owners on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-owner).
* **includeTags**: Set to `true` or `false` to ingest tags from dbt. Default is `true`.
* **dbtClassificationName**: Custom OpenMetadata Classification name for dbt tags.
* **catalogMapping**: Map of database names in the dbt manifest to the database names they are ingested under in OpenMetadata. Use it when the name dbt writes into the manifest differs from the name the connector ingested. Keys are matched ignoring case. For more information, see [Map dbt Catalog Names to OpenMetadata Databases](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-lineage#map-dbt-catalog-names-to-openmetadata-databases).
* **databaseFilterPattern**, **schemaFilterPattern**: Add filters to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/database).
* **tableFilterPattern**: Add a filter to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/table).

#### Sink Configuration

To send the metadata to OpenMetadata, it needs to be specified as `type: metadata-rest`.

#### Workflow Configuration

The main property here is `openMetadataServerConfig`, where you can define the host and security provider of your OpenMetadata installation.

* **loggerLevel**: Specify the logger level depending on your needs. If you are troubleshooting an ingestion, use `DEBUG` for more detailed traces.
* **JWT token**: JWT tokens allow clients to authenticate against the OpenMetadata server. See [Enable JWT Tokens](https://docs.open-metadata.org/deployment/security/enable-jwt-tokens) and [JWT Troubleshooting](https://docs.open-metadata.org/deployment/security/jwt-troubleshooting) for more information.
* **storeServiceConnection**: If set to `true` (default), sensitive information is stored encrypted with the Fernet Key or externally if you have configured a [Secrets Manager](https://docs.open-metadata.org/deployment/secrets-manager). If set to `false`, the service is created, but the service connection information is only used by the Ingestion Framework at runtime and is not sent to the OpenMetadata server.
* **SSL configuration**: If you have added SSL to the [OpenMetadata server](https://docs.open-metadata.org/deployment/security/enable-ssl), configure the certificates for ingestion. Set `verifySSL` to `ignore`, or set it to `validate` and provide `sslConfig.caCertificate` with a local path to the server certificate. See [SSL Troubleshooting](https://docs.open-metadata.org/deployment/security/enable-ssl/ssl-troubleshooting) for more information.
* **ingestionPipelineFQN**: Fully qualified name of the ingestion pipeline, used to identify the current ingestion pipeline.

dbt\_config.yaml
Copy full code

```yaml theme={null}
source:
  type: dbt
  serviceName: service_name
  sourceConfig:
    config:
      type: DBT
      dbtConfigSource:
        dbtConfigType: azure
        dbtSecurityConfig:
          clientId: client-id
          clientSecret: client-secret
          tenantId: tenant-id
          accountName: account-name
```

```yaml theme={null}
        dbtPrefixConfig:
          dbtBucketName: bucket_name
          dbtObjectPrefix: main_dir/dbt_files/
```

```yaml theme={null}
      # dbtUpdateDescriptions: true or false
      # dbtUpdateOwners: true or false
      # includeTags: true or false
      # dbtClassificationName: dbtTags
      # catalogMapping:
      #   bq_catalog: my-gcp-project
      # databaseFilterPattern:
      #   includes:
      #     - .*db.*
      #   excludes:
      #     - .*demo.*
      # schemaFilterPattern:
      #   includes:
      #     - .*schema.*
      #   excludes:
      #     - .*demo.*
      # tableFilterPattern:
      #   includes:
      #     - .*table.*
      #   excludes:
      #     - .*demo.*
```

```yaml theme={null}
sink:
  type: metadata-rest
  config: {}
```

```yaml theme={null}
workflowConfig:
  loggerLevel: INFO  # DEBUG, INFO, WARNING or ERROR
  openMetadataServerConfig:
    hostPort: "http://localhost:8585/api"
    authProvider: openmetadata
    securityConfig:
      jwtToken: "{bot_jwt_token}"
    ## Store the service Connection information
    storeServiceConnection: true  # false
    ## Secrets Manager Configuration
    # secretsManagerProvider: aws, azure or noop
    # secretsManagerLoader: airflow or env
    ## If SSL, fill the following
    # verifySSL: validate  # or ignore
    # sslConfig:
    #   caCertificate: /local/path/to/certificate
# ingestionPipelineFQN: <service name>.<ingestion name> ## e.g., "my_redshift.metadata"
```

### 4. dbt Core: Local Storage

In this configuration we fetch dbt artifacts from the machine running the ingestion.

#### Source Configuration

Configure the source type and service name for your dbt workflow.

#### dbt Config Source

Set `dbtConfigType` to `local` and provide file paths for dbt artifacts.

#### Source Config

* **dbtUpdateDescriptions**: Configuration to update the description from dbt or not. If set to true, descriptions from dbt will override the already present descriptions on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-descriptions).
* **dbtUpdateOwners**: Configuration to update the owner from dbt or not. If set to true, owners from dbt will override the already present owners on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-owner).
* **includeTags**: Set to `true` or `false` to ingest tags from dbt. Default is `true`.
* **dbtClassificationName**: Custom OpenMetadata Classification name for dbt tags.
* **catalogMapping**: Map of database names in the dbt manifest to the database names they are ingested under in OpenMetadata. Use it when the name dbt writes into the manifest differs from the name the connector ingested. Keys are matched ignoring case. For more information, see [Map dbt Catalog Names to OpenMetadata Databases](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-lineage#map-dbt-catalog-names-to-openmetadata-databases).
* **databaseFilterPattern**, **schemaFilterPattern**: Add filters to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/database).
* **tableFilterPattern**: Add a filter to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/table).

#### Sink Configuration

To send the metadata to OpenMetadata, it needs to be specified as `type: metadata-rest`.

#### Workflow Configuration

The main property here is `openMetadataServerConfig`, where you can define the host and security provider of your OpenMetadata installation.

* **loggerLevel**: Specify the logger level depending on your needs. If you are troubleshooting an ingestion, use `DEBUG` for more detailed traces.
* **JWT token**: JWT tokens allow clients to authenticate against the OpenMetadata server. See [Enable JWT Tokens](https://docs.open-metadata.org/deployment/security/enable-jwt-tokens) and [JWT Troubleshooting](https://docs.open-metadata.org/deployment/security/jwt-troubleshooting) for more information.
* **storeServiceConnection**: If set to `true` (default), sensitive information is stored encrypted with the Fernet Key or externally if you have configured a [Secrets Manager](https://docs.open-metadata.org/deployment/secrets-manager). If set to `false`, the service is created, but the service connection information is only used by the Ingestion Framework at runtime and is not sent to the OpenMetadata server.
* **SSL configuration**: If you have added SSL to the [OpenMetadata server](https://docs.open-metadata.org/deployment/security/enable-ssl), configure the certificates for ingestion. Set `verifySSL` to `ignore`, or set it to `validate` and provide `sslConfig.caCertificate` with a local path to the server certificate. See [SSL Troubleshooting](https://docs.open-metadata.org/deployment/security/enable-ssl/ssl-troubleshooting) for more information.
* **ingestionPipelineFQN**: Fully qualified name of the ingestion pipeline, used to identify the current ingestion pipeline.

dbt\_config.yaml
Copy full code

```yaml theme={null}
source:
  type: dbt
  serviceName: service_name
  sourceConfig:
    config:
      type: DBT
      dbtConfigSource:
        dbtConfigType: local
        dbtCatalogFilePath: /path/to/catalog.json
        dbtManifestFilePath: /path/to/manifest.json
        dbtRunResultsFilePath: /path/to/run_results.json
```

```yaml theme={null}
      # dbtUpdateDescriptions: true or false
      # dbtUpdateOwners: true or false
      # includeTags: true or false
      # dbtClassificationName: dbtTags
      # catalogMapping:
      #   bq_catalog: my-gcp-project
      # databaseFilterPattern:
      #   includes:
      #     - .*db.*
      #   excludes:
      #     - .*demo.*
      # schemaFilterPattern:
      #   includes:
      #     - .*schema.*
      #   excludes:
      #     - .*demo.*
      # tableFilterPattern:
      #   includes:
      #     - .*table.*
      #   excludes:
      #     - .*demo.*
```

```yaml theme={null}
sink:
  type: metadata-rest
  config: {}
```

```yaml theme={null}
workflowConfig:
  loggerLevel: INFO  # DEBUG, INFO, WARNING or ERROR
  openMetadataServerConfig:
    hostPort: "http://localhost:8585/api"
    authProvider: openmetadata
    securityConfig:
      jwtToken: "{bot_jwt_token}"
    ## Store the service Connection information
    storeServiceConnection: true  # false
    ## Secrets Manager Configuration
    # secretsManagerProvider: aws, azure or noop
    # secretsManagerLoader: airflow or env
    ## If SSL, fill the following
    # verifySSL: validate  # or ignore
    # sslConfig:
    #   caCertificate: /local/path/to/certificate
# ingestionPipelineFQN: <service name>.<ingestion name> ## e.g., "my_redshift.metadata"
```

### 5. dbt Core: File Server

In this configuration we fetch dbt artifacts from an HTTP or file server.

#### Source Configuration

Configure the source type and service name for your dbt workflow.

#### dbt Config Source

Set `dbtConfigType` to `http` and provide HTTP URLs for dbt artifacts.

#### Source Config

* **dbtUpdateDescriptions**: Configuration to update the description from dbt or not. If set to true, descriptions from dbt will override the already present descriptions on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-descriptions).
* **dbtUpdateOwners**: Configuration to update the owner from dbt or not. If set to true, owners from dbt will override the already present owners on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-owner).
* **includeTags**: Set to `true` or `false` to ingest tags from dbt. Default is `true`.
* **dbtClassificationName**: Custom OpenMetadata Classification name for dbt tags.
* **catalogMapping**: Map of database names in the dbt manifest to the database names they are ingested under in OpenMetadata. Use it when the name dbt writes into the manifest differs from the name the connector ingested. Keys are matched ignoring case. For more information, see [Map dbt Catalog Names to OpenMetadata Databases](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-lineage#map-dbt-catalog-names-to-openmetadata-databases).
* **databaseFilterPattern**, **schemaFilterPattern**: Add filters to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/database).
* **tableFilterPattern**: Add a filter to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/table).

#### Sink Configuration

To send the metadata to OpenMetadata, it needs to be specified as `type: metadata-rest`.

#### Workflow Configuration

The main property here is `openMetadataServerConfig`, where you can define the host and security provider of your OpenMetadata installation.

* **loggerLevel**: Specify the logger level depending on your needs. If you are troubleshooting an ingestion, use `DEBUG` for more detailed traces.
* **JWT token**: JWT tokens allow clients to authenticate against the OpenMetadata server. See [Enable JWT Tokens](https://docs.open-metadata.org/deployment/security/enable-jwt-tokens) and [JWT Troubleshooting](https://docs.open-metadata.org/deployment/security/jwt-troubleshooting) for more information.
* **storeServiceConnection**: If set to `true` (default), sensitive information is stored encrypted with the Fernet Key or externally if you have configured a [Secrets Manager](https://docs.open-metadata.org/deployment/secrets-manager). If set to `false`, the service is created, but the service connection information is only used by the Ingestion Framework at runtime and is not sent to the OpenMetadata server.
* **SSL configuration**: If you have added SSL to the [OpenMetadata server](https://docs.open-metadata.org/deployment/security/enable-ssl), configure the certificates for ingestion. Set `verifySSL` to `ignore`, or set it to `validate` and provide `sslConfig.caCertificate` with a local path to the server certificate. See [SSL Troubleshooting](https://docs.open-metadata.org/deployment/security/enable-ssl/ssl-troubleshooting) for more information.
* **ingestionPipelineFQN**: Fully qualified name of the ingestion pipeline, used to identify the current ingestion pipeline.

dbt\_config.yaml
Copy full code

```yaml theme={null}
source:
  type: dbt
  serviceName: service_name
  sourceConfig:
    config:
      type: DBT
      dbtConfigSource:
        dbtConfigType: http
        dbtCatalogHttpPath: https://example.com/catalog.json
        dbtManifestHttpPath: https://example.com/manifest.json
        dbtRunResultsHttpPath: https://example.com/run_results.json
```

```yaml theme={null}
      # dbtUpdateDescriptions: true or false
      # dbtUpdateOwners: true or false
      # includeTags: true or false
      # dbtClassificationName: dbtTags
      # catalogMapping:
      #   bq_catalog: my-gcp-project
      # databaseFilterPattern:
      #   includes:
      #     - .*db.*
      #   excludes:
      #     - .*demo.*
      # schemaFilterPattern:
      #   includes:
      #     - .*schema.*
      #   excludes:
      #     - .*demo.*
      # tableFilterPattern:
      #   includes:
      #     - .*table.*
      #   excludes:
      #     - .*demo.*
```

```yaml theme={null}
sink:
  type: metadata-rest
  config: {}
```

```yaml theme={null}
workflowConfig:
  loggerLevel: INFO  # DEBUG, INFO, WARNING or ERROR
  openMetadataServerConfig:
    hostPort: "http://localhost:8585/api"
    authProvider: openmetadata
    securityConfig:
      jwtToken: "{bot_jwt_token}"
    ## Store the service Connection information
    storeServiceConnection: true  # false
    ## Secrets Manager Configuration
    # secretsManagerProvider: aws, azure or noop
    # secretsManagerLoader: airflow or env
    ## If SSL, fill the following
    # verifySSL: validate  # or ignore
    # sslConfig:
    #   caCertificate: /local/path/to/certificate
# ingestionPipelineFQN: <service name>.<ingestion name> ## e.g., "my_redshift.metadata"
```

### 6. dbt Cloud: API-Based Ingestion

In this configuration we fetch dbt artifacts from dbt Cloud APIs.

> [!TIP]
>
> The dbt Cloud workflow uses the dbt Cloud v2 APIs to retrieve the latest completed run (successful or failed) and download artifacts.

> [!NOTE]
>
> **Dbt Cloud Job Id** takes a single job. The workflow reads the artifacts, including test results, from that job's most recent completed run. To ingest test results from several dbt Cloud jobs, create one dbt workflow per job against the same database service. If you leave **Dbt Cloud Job Id** empty, OpenMetadata uses the most recent completed run in the account (or in the project, if you set a project ID).

#### Source Configuration

Configure the source type and service name for your dbt workflow.

#### dbt Config Source

Set `dbtConfigType` to `cloud` and provide your dbt Cloud credentials and identifiers.

#### Source Config

* **dbtUpdateDescriptions**: Configuration to update the description from dbt or not. If set to true, descriptions from dbt will override the already present descriptions on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-descriptions).
* **dbtUpdateOwners**: Configuration to update the owner from dbt or not. If set to true, owners from dbt will override the already present owners on the entity. For more details visit [here](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-owner).
* **includeTags**: Set to `true` or `false` to ingest tags from dbt. Default is `true`.
* **dbtClassificationName**: Custom OpenMetadata Classification name for dbt tags.
* **catalogMapping**: Map of database names in the dbt manifest to the database names they are ingested under in OpenMetadata. Use it when the name dbt writes into the manifest differs from the name the connector ingested. Keys are matched ignoring case. For more information, see [Map dbt Catalog Names to OpenMetadata Databases](https://docs.open-metadata.org/connectors/database/dbt/ingest-dbt-lineage#map-dbt-catalog-names-to-openmetadata-databases).
* **databaseFilterPattern**, **schemaFilterPattern**: Add filters to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/database).
* **tableFilterPattern**: Add a filter to filter out models from the dbt manifest. Note that the filter supports regex as include or exclude. You can find examples [here](https://docs.open-metadata.org/connectors/ingestion/workflows/metadata/filter-patterns/table).

#### Sink Configuration

To send the metadata to OpenMetadata, it needs to be specified as `type: metadata-rest`.

#### Workflow Configuration

The main property here is `openMetadataServerConfig`, where you can define the host and security provider of your OpenMetadata installation.

* **loggerLevel**: Specify the logger level depending on your needs. If you are troubleshooting an ingestion, use `DEBUG` for more detailed traces.
* **JWT token**: JWT tokens allow clients to authenticate against the OpenMetadata server. See [Enable JWT Tokens](https://docs.open-metadata.org/deployment/security/enable-jwt-tokens) and [JWT Troubleshooting](https://docs.open-metadata.org/deployment/security/jwt-troubleshooting) for more information.
* **storeServiceConnection**: If set to `true` (default), sensitive information is stored encrypted with the Fernet Key or externally if you have configured a [Secrets Manager](https://docs.open-metadata.org/deployment/secrets-manager). If set to `false`, the service is created, but the service connection information is only used by the Ingestion Framework at runtime and is not sent to the OpenMetadata server.
* **SSL configuration**: If you have added SSL to the [OpenMetadata server](https://docs.open-metadata.org/deployment/security/enable-ssl), configure the certificates for ingestion. Set `verifySSL` to `ignore`, or set it to `validate` and provide `sslConfig.caCertificate` with a local path to the server certificate. See [SSL Troubleshooting](https://docs.open-metadata.org/deployment/security/enable-ssl/ssl-troubleshooting) for more information.
* **ingestionPipelineFQN**: Fully qualified name of the ingestion pipeline, used to identify the current ingestion pipeline.

dbt\_config.yaml
Copy full code

```yaml theme={null}
source:
  type: dbt
  serviceName: service_name
  sourceConfig:
    config:
      type: DBT
      dbtConfigSource:
        dbtConfigType: cloud
        dbtCloudAuthToken: AUTH_TOKEN
        dbtCloudAccountId: ACCOUNT_ID
        dbtCloudProjectId: PROJECT_ID
        dbtCloudJobId: JOB_ID
        dbtCloudUrl: https://cloud.getdbt.com
```

```yaml theme={null}
      # dbtUpdateDescriptions: true or false
      # dbtUpdateOwners: true or false
      # includeTags: true or false
      # dbtClassificationName: dbtTags
      # catalogMapping:
      #   bq_catalog: my-gcp-project
      # databaseFilterPattern:
      #   includes:
      #     - .*db.*
      #   excludes:
      #     - .*demo.*
      # schemaFilterPattern:
      #   includes:
      #     - .*schema.*
      #   excludes:
      #     - .*demo.*
      # tableFilterPattern:
      #   includes:
      #     - .*table.*
      #   excludes:
      #     - .*demo.*
```

```yaml theme={null}
sink:
  type: metadata-rest
  config: {}
```

```yaml theme={null}
workflowConfig:
  loggerLevel: INFO  # DEBUG, INFO, WARNING or ERROR
  openMetadataServerConfig:
    hostPort: "http://localhost:8585/api"
    authProvider: openmetadata
    securityConfig:
      jwtToken: "{bot_jwt_token}"
    ## Store the service Connection information
    storeServiceConnection: true  # false
    ## Secrets Manager Configuration
    # secretsManagerProvider: aws, azure or noop
    # secretsManagerLoader: airflow or env
    ## If SSL, fill the following
    # verifySSL: validate  # or ignore
    # sslConfig:
    #   caCertificate: /local/path/to/certificate
# ingestionPipelineFQN: <service name>.<ingestion name> ## e.g., "my_redshift.metadata"
```

### 2. Run with the CLI

First, we will need to save the YAML file. Afterward, and with all requirements installed, we can run:

```bash theme={null}
metadata ingest -c <path-to-yaml>
```

Note that from connector to connector, this recipe will always be the same. By updating the YAML configuration,
you will be able to extract metadata from different sources.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.