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

[CT-628] Inconsistency between get_columns_in_relation method + macro #354

Closed
jtcohen6 opened this issue May 11, 2022 · 0 comments · Fixed by #355
Closed

[CT-628] Inconsistency between get_columns_in_relation method + macro #354

jtcohen6 opened this issue May 11, 2022 · 0 comments · Fixed by #355
Labels
type:bug Something isn't working

Comments

@jtcohen6
Copy link
Contributor

Follow-up to dbt-labs/dbt-core#5232

Other adapters have total consistency between:

  • adapter.get_columns_in_relation (adapter class method)
  • get_columns_in_relation (Jinja macro)

Whereas:

In dbt-spark, the logic is written in both Python and SQL. The adapter method calls the macro, but it also does some of its own post-processing, which is missed if you just call the macro directly.

Let's aim for consistency by:

  • renaming the macro that returns unprocessed data, to get_columns_in_relation_raw
  • adding a macro named get_columns_in_relation that repoints to the adapter method

This is a breaking change only for those users who have been calling get_columns_in_relation, as a macro, and expecting it to return raw/unprocessed results. We can call out clearly in the changelog + release notes that this wasn't intended behavior, and users can still achieve that behavior by calling the new get_columns_in_relation_raw macro.

@jtcohen6 jtcohen6 added the type:bug Something isn't working label May 11, 2022
@github-actions github-actions bot changed the title Inconsistency between get_columns_in_relation method + macro [CT-628] Inconsistency between get_columns_in_relation method + macro May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant