---
title: CI/CD
description: >-
  Automatically check pull requests that modify dbt models for downstream impact
  and data drift before they merge.
breadcrumbs: Docs > Data Observability Overview > CI/CD
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# CI/CD

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

{% image
   source="https://docs.dd-static.net/images/data_observability/cicd/cicd-overview.8a44b45e9d405f99bfdf71f78c51bb08.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/data_observability/cicd/cicd-overview.8a44b45e9d405f99bfdf71f78c51bb08.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="The CI/CD feature report page" /%}

Data Observability CI/CD checks run automatically when you open a pull request (PR) that modifies dbt models. The checks give you the information you need to decide whether a change is safe to merge.

Datadog posts the results as a comment on your PR, and the comment updates each time you push new changes. A full report is also available in Datadog, and you get a link to it in the PR comment.

## Check types{% #check-types %}

### Impact Lineage{% #impact-lineage %}

Impact Lineage builds a graph of everything downstream of your changed dbt models. Use it to assess the blast radius of a change before merging. See which tables, dashboards, and other consumers depend on the models you modified, and route review to the right owners.

See [Lineage](https://docs.datadoghq.com/data_observability/lineage.md) for more detail on how Datadog builds and navigates lineage graphs.

### Drift Detection{% #drift-detection %}

Drift Detection compares the data produced by your models before and after your changes using a series of statistical checks. Use it to confirm that a model change produces the expected output, or to catch unintended side effects such as significant row-count changes, null-rate shifts, or cardinality changes in a column's values.

## Setup{% #setup %}

### 1. Connect your source control provider and dbt project

1. Connect your [source-control provider](https://docs.datadoghq.com/integrations.md#cat-source-control). CI/CD checks support GitHub and GitLab.
1. Connect the [supported data source account](https://docs.datadoghq.com/data_observability/quality_monitoring.md#supported-data-sources) where your dbt models run.
1. Connect your [dbt Cloud](https://docs.datadoghq.com/data_observability/jobs_monitoring/dbt.md?tab=dbtcloud) or [dbt Core](https://docs.datadoghq.com/data_observability/jobs_monitoring/dbt.md?tab=dbtcore) project to Datadog. You can also connect your dbt project while configuring CI/CD checks.

### 2. Select your dbt project and repository

1. From the CI/CD settings, click Add CI/CD Checks.
1. Select the dbt project you want to add checks for.
1. Select the main job for the project. This is the job with the most knowledge of your dbt schema.
1. If Datadog doesn't automatically infer the repository from your source-control provider, select it manually.

{% image
   source="https://docs.dd-static.net/images/data_observability/cicd/cicd-connection.2d56081217f1ea18b9d991d6fdbe341b.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/data_observability/cicd/cicd-connection.2d56081217f1ea18b9d991d6fdbe341b.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="The CI/CD feature creation page" /%}

#### Advanced settings{% #advanced-settings %}

If your dbt project doesn't live at the root of your repository, you can specify the path to your dbt project in the advanced settings.

### 3. Configure checks

You can enable each check independently. Enabling all checks yields the richest reports.

#### Impact Lineage{% #impact-lineage-1 %}

Impact lineage generates a graph of the downstream assets that may be affected by your model changes.

##### General settings{% #general-settings %}

| Setting                            | Description                                                          |
| ---------------------------------- | -------------------------------------------------------------------- |
| `Run on Draft Pull/Merge Requests` | Enable this option to run the check on draft pull or merge requests. |

#### Drift Detection{% #drift-detection-1 %}

Drift detection compares the current state of your data on the branch to a baseline and flags any deviations. For Datadog to understand which models ran as part of a CI pipeline, you must send OpenLineage events from your CI job. Datadog uses these events as triggers for drift detection checks. See the [OpenLineage setup documentation](https://docs.datadoghq.com/data_observability/jobs_monitoring/openlineage.md) for instructions on how to set up OpenLineage.

##### General settings{% #general-settings-1 %}

| Setting                            | Description                                                                                                                                                   |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Run on Draft Pull/Merge Requests` | Enable this option to run the check on draft pull or merge requests.                                                                                          |
| `Threshold`                        | The threshold for drift detection (for example, `0.1` for 10% drift). If a metric exceeds this threshold, it shows up as a warning in the check results.      |
| `Downstream Checks`                | When a dbt model changes, drift detection checks are generated for it and any downstream dbt models. This setting controls how far downstream the checks run. |

##### dbt Cloud{% #dbt-cloud %}

| Setting      | Description                                                                                                                                                                                                |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CI Job URL` | The locator for the dbt Cloud CI job that's triggered by pull requests, materializes dbt models for CI, and sends OpenLineage events to Datadog. These typically look like `https://cloud.getdbt.com/...`. |

##### dbt Core{% #dbt-core %}

| Setting            | Description                                                                                                                                                                                                                                                                                                                                                        |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `CI Job Name`      | The name of the job that's triggered by pull requests, materializes dbt models for CI, and sends OpenLineage events to Datadog.                                                                                                                                                                                                                                    |
| `CI Job Namespace` | The OPENLINEAGE_NAMESPACE variable specified when sending OpenLineage events from the job specified above. See [Set the environment variables](https://docs.datadoghq.com/data_observability/jobs_monitoring/dbt.md?tab=dbtcore#set-the-environment-variables). If you don't set this variable when sending OpenLineage events, you don't need to specify it here. |

## Further reading{% #further-reading %}

- [Data Observability Overview](https://docs.datadoghq.com/data_observability.md)
- [Data Catalog](https://docs.datadoghq.com/data_observability/data_catalog.md)
- [Lineage](https://docs.datadoghq.com/data_observability/lineage.md)
- [Quality Monitoring](https://docs.datadoghq.com/data_observability/quality_monitoring.md)
- [Jobs Monitoring](https://docs.datadoghq.com/data_observability/jobs_monitoring.md)
