Skip to content

Surfacing of DBT Cloud Logs to the logs of the DBTCloudRunJobOperator #46923

Closed

Description

@harveymarshall

Description

Currently if a DBT Cloud Job triggered by the DBT Cloud Job Operator fails. The airflow task which uses the operator will fail and error but it will not get the logs from DBT Cloud so we are aware of why it failed.

Use case/motivation

Easier developer experience when debugging tasks. Helps remove extra steps when seeing why a DAG has failed.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:feature
    needs-triage
    on Feb 20, 2025
  2. boring-cyborg commented on Feb 20, 2025

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  3. geraj1010 commented on Mar 9, 2025

    @geraj1010
    Contributor

    Took a quick look and I think this is possible. Just need update DbtCloudHook to pull the logging that's available from the API response. Perhaps we would want to grab status_message from Retrieve Run response? (https://docs.getdbt.com/dbt-cloud/api-v2#/operations/Retrieve%20Run)

    I'd be happy to take this on if no one else already hasn't.

  4. potiuk commented on Mar 9, 2025

    @potiuk
    Member

    I'd be happy to take this on if no one else already hasn't.

    Feel free :D

  5. harveymarshall commented on Mar 12, 2025

    @harveymarshall
    Author

    Any updates has this been taken up? Any updates would be appreciated :)

  6. geraj1010 commented on Mar 18, 2025

    @geraj1010
    Contributor

    Any updates has this been taken up? Any updates would be appreciated :)

    Greetings! I should have an update later this week :) Just coming off of a cold.

  7. geraj1010 commented on Mar 24, 2025

    @geraj1010
    Contributor

    Took a deeper dive and it looks like the logs (for steps) can be found with this API URL: https://YOUR_ACCESS_URL/api/v2/accounts/{accountId}/runs/{runId}/?include_related=["run_steps"] (Source: https://docs.getdbt.com/docs/dbt-versions/2022-release-notes?utm_source=forethought-chat&utm_lp=forethought-chat#list-steps-api-endpoint-deprecation-warning)

    However, you get all steps of a DAG back including preliminary steps like Clone git repository. I was thinking of surfacing only the steps with status: 20 (i.e. ERROR). Would that be helpful @harveymarshall ?

  8. added 2 commits that reference this issue on May 25, 2025
  9. added a commit that references this issue on Jun 6, 2025
  10. potiuk commented on Mar 2, 2026

    @potiuk
    Member

    @geraj1010 We are unassigning you from this issue as part of our updated assignment policy.

    This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.

    We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.

  11. br413 commented on Jul 21, 2026

    @br413
    Contributor

    Opened #70171 to surface dbt Cloud run failure details (status message and failed run steps) in Airflow task logs when a job run reaches ERROR or CANCELLED.

  12. added a commit that references this issue on Sep 14, 2026
    ac26331
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:loggingkind:featureneeds-triageprovider:dbt-cloud

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions