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

# datahub-sync

### Overview

Paradime provides a convenient way to push dbt™ metadata from your Bolt runs directly into DataHub, keeping your DataHub catalog up to date with the latest models, lineage, columns, and descriptions from your dbt™ project.

By leveraging Paradime's DataHub Integration, you can orchestrate your data pipeline by pushing dbt™ artifacts to DataHub immediately after your dbt™ transformations complete. You can configure this by adding the push command directly in the same Bolt schedule as your dbt™ commands, or by using the on run completion trigger in a separate pipeline.

Under the hood, Paradime feeds the [manifest file](https://docs.getdbt.com/reference/artifacts/manifest-json) and the [catalog file](https://docs.getdbt.com/reference/artifacts/catalog-json) into DataHub's native `dbt` ingestion source, so the result matches what a dbt Cloud / dbt Core ingestion produces.

<Frame>
  <img src="https://mintcdn.com/paradime-docs/vrtvqFryCVgm3kAH/images/image-280.png?fit=max&auto=format&n=vrtvqFryCVgm3kAH&q=85&s=292377dddb4a46df5d959ea870b04860" alt="" width="1724" height="678" data-path="images/image-280.png" />
</Frame>

<Warning>
  **Prerequisites**

  **1. Configure the DataHub Integration**

  You will need a DataHub GMS URL and a Personal Access Token to use these commands. See our docs here.

  **🔧 dbt™ Artifact Configuration**

  * DataHub's dbt source needs **both** `target/manifest.json` **and** `target/catalog.json`.
  * The catalog is only produced by `dbt docs generate`, so your schedule must run `dbt docs generate` before the push command.
  * Whenever a dbt™ command is executed, files in the `target` directory will be overwritten. So you will need to run the push command after your dbt™ artifacts have been generated.

  **2. Set Environment Variables**

  Set your DataHub credentials and configuration as environment variables for Bolt Schedules

  * `DATAHUB_GMS_URL`
  * `DATAHUB_GMS_TOKEN`
  * `DATAHUB_TARGET_PLATFORM`
  * `DATAHUB_DOMAIN` (optional)
</Warning>

#### How to Configure DataHub Artifacts Push

When setting up the DataHub Artifacts Push task, add the command after the dbt™ commands that generate your artifacts (including `dbt docs generate`). Paradime searches the resources directory and pushes **every** dbt™ project it finds (any folder containing both `target/manifest.json` and `target/catalog.json`), so a multi-project setup is handled in one task.

<Check>
  We recommend running `dbt docs generate` as the step immediately before the push command. This guarantees the `catalog.json` DataHub needs is present and up to date for every run.
</Check>

### datahub-artifacts-push

Push Bolt dbt™ artifacts (manifest + catalog) to DataHub.

```
paradime run datahub-artifacts-push [OPTIONS]
```

| Flag                             | Type               | Description                                                                                                                                                                                                                                                                                     |
| -------------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--datahub-server`               | *`Required, TEXT`* | <p>The DataHub GMS server URL (e.g. <code>https\://\<instance>.acryl.io/gms</code>).</p><p><br />- Env: <code>DATAHUB\_GMS\_URL</code></p>                                                                                                                                                      |
| `--datahub-token`                | *`Required, TEXT`* | <p>The DataHub personal access token used to authenticate to GMS.</p><p><br />- Env: <code>DATAHUB\_GMS\_TOKEN</code></p>                                                                                                                                                                       |
| `--target-platform`              | *`Required, TEXT`* | <p>The data warehouse platform the dbt™ models run on (e.g. <code>snowflake</code>, <code>bigquery</code>, <code>redshift</code>).</p><p><br />- Env: <code>DATAHUB\_TARGET\_PLATFORM</code></p>                                                                                                |
| `--domain`                       | *`Optional, TEXT`* | <p>DataHub domain URN to associate the pushed assets with (e.g. <code>urn:li:domain:sales</code>). When set, every emitted dataset is associated with that domain.</p><p><br />- Env: <code>DATAHUB\_DOMAIN</code></p>                                                                          |
| `--paradime-resources-directory` | *`Optional, TEXT`* | <p>The directory where the Paradime resources are stored. The command searches this directory for <code>target/manifest.json</code> and <code>target/catalog.json</code>.</p><p><br />- Default: current directory (<code>.</code>)<br />- Env: <code>PARADIME\_RESOURCES\_DIRECTORY</code></p> |
| `--json`                         | *`Optional, FLAG`* | Output results as JSON.                                                                                                                                                                                                                                                                         |

<Info>
  **Note**

  Each flag can be supplied either on the command line or via its environment variable. Configuring the integration in Paradime sets these environment variables for you, so in a Bolt schedule you can usually call `paradime run datahub-artifacts-push` with no flags.
</Info>

#### Examples

**Standard push**

When `DATAHUB_GMS_URL`, `DATAHUB_GMS_TOKEN`, and `DATAHUB_TARGET_PLATFORM` are set as environment variables, the command picks them up automatically, so no flags are needed.

<Frame>
  <img src="https://mintcdn.com/paradime-docs/vrtvqFryCVgm3kAH/images/image-281.png?fit=max&auto=format&n=vrtvqFryCVgm3kAH&q=85&s=0b4c43ea64f27891e4b7103b1c8a7c35" alt="" width="1724" height="678" data-path="images/image-281.png" />
</Frame>

```bash theme={"system"}
# Generate the artifacts (catalog requires `dbt docs generate`)
dbt docs generate

# Push the manifest + catalog to DataHub using the environment variables
paradime run datahub-artifacts-push
```

**Push with a domain**

Use the `--domain` flag to associate every pushed asset with a specific DataHub domain URN. This overrides the `DATAHUB_DOMAIN` environment variable for this run.

<Frame>
  <img src="https://mintcdn.com/paradime-docs/vrtvqFryCVgm3kAH/images/image-282.png?fit=max&auto=format&n=vrtvqFryCVgm3kAH&q=85&s=be68a0c69fd92a76dbb3ccc9d8d4e6ff" alt="" width="1724" height="678" data-path="images/image-282.png" />
</Frame>

```bash theme={"system"}
# Generate the artifacts (catalog requires `dbt docs generate`)
dbt docs generate

# Push the manifest + catalog and associate the assets with a domain
paradime run datahub-artifacts-push --domain urn:li:domain:sales
```

<Check>
  **Learn More**: For details on configuring the integration and generating credentials, refer to the [DataHub integration documentation.](/integrations/datahub)
</Check>

***

Now, let's learn how to configure the Trigger Types of a Bolt Schedule.


## Related topics

- [DataHub](/integrations/datahub.md)
- [Fivetran Connector Sync](/products/bolt/creating-schedules/command-settings/fivetran-connector-sync.md)
- [Trigger Hightouch Syncs](/products/bolt/creating-schedules/templates/reverse-etl-templates/trigger-hightouch-syncs.md)
- [Trigger Census Syncs](/products/bolt/creating-schedules/templates/reverse-etl-templates/trigger-census-syncs.md)
- [Airbyte Connector Sync](/products/bolt/creating-schedules/command-settings/airbyte-connector-sync.md)
