https://dagster.io/ logo
#integration-dbt
Title
# integration-dbt
p

Pedram Navid

05/10/2023, 6:13 PM
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

Stephen Bailey

05/10/2023, 6:25 PM
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

Pedram Navid

05/10/2023, 6:25 PM
ohhh nice, you da 👑
and this will report back a dbt run failure as a failed check right?
s

Stephen Bailey

05/10/2023, 6:32 PM
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

Fraser Marlow

05/10/2023, 7:55 PM
@rex ^
p

Pedram Navid

05/10/2023, 8:36 PM
oh nice
go team!
h

Hiroto Yamakawa

05/11/2023, 6:43 PM
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
6 Views