Has anyone used Dagster to run dbt on PR approvals...
# integration-dbt
p
Has anyone used Dagster to run dbt on PR approvals and merges? Currently using Github Actions for that but wondering if Dagster might work for that as well
s
yeah, you can use the dagster cloud ci/cd to run after you redeploy. still using github actions but it will just kick off the job
Copy code
- name: Run dbt-events Job
        uses: dagster-io/dagster-cloud-action/actions/utils/run@v0.1
        if: github.event_name == 'push'
        with:
          location_name: dbt
          job_name: run_some_models_job
          tags_json: '{}'
          config_json: '{}'
          organization_id: ${{ env.ORGANIZATION_ID }}
          deployment: prod
        env:
          DAGSTER_CLOUD_API_TOKEN: ${{ secrets.DAGSTER_CLOUD_API_TOKEN }}
❤️ 1
p
ohhh nice, you da 👑
and this will report back a dbt run failure as a failed check right?
s
hmm, i don't think so -- i think that will just kick off the job. you might have to build some polling logic if you want the CI/CD to actually fail. (vs. just relying on the dagster alerts)
good feature request though -- just adding a param here for
poll_for_completion
seems like it would be not insane
❤️ 1
f
@rex ^
p
oh nice
go team!
h
is this github action only available with
dagster-cloud
? We are in the same situation (i.e. running dbt through github actions when PR are opened/merged), and are in discussion for dagster-cloud, but I am currently doing our POC on dagster OSS