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

[Backport] PRs 955 and 957 to 1.6.latest #958

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

McKnight-42
Copy link
Contributor

resolves #863
docs dbt-labs/docs.getdbt.com/#

Problem

A regression appears in the last release of dbt-bigquery. A user can previously add labels to a BigQuery job thanks to a macro returning a mapping. In the version 1.6.0, this was no longer possible even if the project is set to activate this feature.

Solution

#955
The proposed solution is to use, instead of self.profile.query_comment (which is the not-rendered Jinja macro), self.query_header.comment.query_comment (the JSON rendered query comments).

#957
to functionalize the small snippet and create a small change by making it to two nested if statements and moving the empty set of variable to top of function.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@McKnight-42 McKnight-42 self-assigned this Oct 6, 2023
@McKnight-42 McKnight-42 requested a review from a team as a code owner October 6, 2023 21:20
@cla-bot cla-bot bot added the cla:yes label Oct 6, 2023
@colin-rogers-dbt colin-rogers-dbt merged commit 03437d5 into 1.6.latest Oct 9, 2023
30 checks passed
@colin-rogers-dbt colin-rogers-dbt deleted the McKnight-42/backport-957-1-6 branch October 9, 2023 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants