Skip to main content
To use the Datafold REST API, you should first create a Datafold API key in Settings > Account.
For automated/unattended integrations, we recommend creating a service account API key instead of a personal one. Service-account keys belong to your organization rather than to an individual user, so your integration keeps working if the original creator leaves the team.

Install

Then, create your virtual environment for Python:
Now, you’re ready to install the Datafold SDK:

Configure

Navigate in the Datafold UI to Settings > Integrations > CI. After selecting datafold-sdk from the available options, complete configuration with the following information:

Add commands to your custom orchestration

To submit diffs for a CI run, replace ci_config_id, pr_num, and diffs_file with the appropriate values for your CI configuration ID, pull request number, and the path to your diffs JSON file.

CLI

Python

Example JSON format for diffs file
The JSON file should define the production and pull request tables to compare, along with any primary keys and columns to include or exclude in the comparison.