A GitHub Action to integrate Recce Cloud into your CI/CD pipeline, automatically uploading DBT artifacts for data quality checks and lineage analysis.
- β Automated DBT Integration: Seamlessly upload DBT manifest and catalog files
- β Pull Request Sessions: Automatic session creation for PR reviews
- β Base Branch Tracking: Keep your base branch up-to-date in Recce Cloud
- β Reliable: Built-in retry logic and comprehensive error handling
- β Easy Setup: Simple configuration with sensible defaults
- Recce Cloud Account: Sign up at Recce Cloud
- GitHub Repository Integration: Install the Recce Cloud GitHub App from your repository settings
- DBT Project: Your workflow must build DBT artifacts (
manifest.json
andcatalog.json
) before using this action
We recommend setting up two separate workflows: one for the base branch and one for pull requests.
name: Update Base Recce Session
on:
push:
branches: ["main"]
schedule:
- cron: "0 2 * * *" # Daily at 2 AM UTC
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
update-base-session:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Prepare dbt artifacts
run: |
# Install dbt packages
dbt deps
# Optional: Build tables to ensure they're materialized and updated
# dbt build --target prod
# Required: Generate artifacts (provides all we need)
dbt docs generate --target prod
env:
DBT_ENV_SECRET_KEY: ${{ secrets.DBT_ENV_SECRET_KEY }}
- name: Update Recce Cloud Base Session
uses: DataRecce/recce-cloud-cicd-action@v1
name: Validate PR Changes
on:
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate-changes:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: |
pip install -r requirements.txt
# Step 1: Prepare current branch artifacts
- name: Build current branch artifacts
run: |
# Install dbt packages
dbt deps
# Optional: Build tables to ensure they're materialized
# dbt build --target ci
# Required: Generate artifacts for comparison
dbt docs generate --target ci
env:
DBT_ENV_SECRET_KEY: ${{ secrets.DBT_ENV_SECRET_KEY }}
- name: Update Recce PR Session
uses: DataRecce/recce-cloud-cicd-action@v1
- name: Upload to Recce Cloud
uses: DataRecce/recce-cloud-cicd-action@v1
with:
dbt_target_path: 'custom-target'
base_branch: 'develop'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Input | Description | Required | Default |
---|---|---|---|
dbt_target_path |
Path to DBT target directory with manifest.json and catalog.json | No | target |
base_branch |
Base branch for deployment | No | main |
github_token |
GitHub authentication token | No | ${{ github.token }} |
Output | Description | Available |
---|---|---|
session_id |
Recce Cloud session ID for accessing the review session | Pull requests only |
- Pull Request Events: When a PR is opened or updated, the action creates a new Recce Cloud session with your current branch's DBT artifacts
- Push to Base Branch: When changes are pushed to your base branch (e.g.,
main
), the action updates the base session for comparison - Session Link: For PRs, a session link is automatically added to the GitHub Actions summary, allowing your team to review changes in Recce Cloud
Error: DBT manifest.json file not found
Solution: Ensure your workflow builds DBT artifacts before running this action:
- name: Build DBT artifacts
run: |
dbt deps
dbt build
dbt docs generate # This generates catalog.json
Error: Failed to create or retrieve Recce session
Solution:
- Verify the Recce Cloud GitHub App is installed on your repository
- Ensure
GITHUB_TOKEN
has proper permissions in your workflow - Check that your repository is connected to Recce Cloud
If your DBT project uses a custom target directory:
- name: Upload to Recce Cloud
uses: DataRecce/recce-cloud-cicd-action@v1
with:
dbt_target_path: 'path/to/your/target'
Need help? We're here for you!
- π¬ Discord: Join our community at https://discord.com/invite/VpwXRC34jz
- π§ Email: [email protected]
- οΏ½ Issues: Report bugs at https://github.com/DataRecce/recce-cloud-cicd-action/issues
- π Documentation: https://docs.reccehq.com
Apache-2.0 - see LICENSE file for details