Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check the type of dbt result when converting to markdown #16869

Conversation

dominictarro
Copy link
Contributor

Closes #16868

This change makes create_summary_markdown use different variables depending on the dbt command's output type.

RunResult -> .node.name
RunResultOutput -> .unique_id

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

trigger_dbt_cli_command will respond with more than one type depending on the command invoked. This change uses the appropriate var depending on that result type.
From a test run

```
## Successful Nodes ✅

* unique_id=macro.dbt_external_tables.stage_external_sources message=None relation_name=None adapter_response={}
```
@github-actions github-actions bot added bug Something isn't working labels Jan 27, 2025
Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @dominictarro for the PR! this makes sense to me, though I think we'll need to change the expectation of this failing test: test_run_dbt_source_freshness_creates_artifact

@dominictarro
Copy link
Contributor Author

@zzstoatzz ready to rock

Copy link
Collaborator

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @dominictarro !

@zzstoatzz zzstoatzz added integrations Related to integrations with other services fix A fix for a bug in an existing feature labels Jan 28, 2025
@zzstoatzz zzstoatzz merged commit c2e0a1e into PrefectHQ:main Jan 28, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix A fix for a bug in an existing feature integrations Related to integrations with other services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prefect-dbt summary artifact error for some commands
2 participants