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: Make union_relations include/exclude case insensitive #587

Merged
merged 3 commits into from
Sep 14, 2022

Conversation

jeremyyeo
Copy link
Contributor

@jeremyyeo jeremyyeo commented May 12, 2022

This is a:

  • documentation update
  • bug fix with no breaking changes
  • new functionality
  • a breaking change

All pull requests from community contributors should target the main branch (default).

Description & motivation

Fixes #578.

Checklist

  • I have verified that these changes work locally on the following warehouses (Note: it's okay if you do not have access to all warehouses, this helps us understand what has been covered)
    • BigQuery
    • Postgres
    • Redshift
    • Snowflake
  • I followed guidelines to ensure that my changes will work on "non-core" adapters by:
    • dispatching any new macro(s) so non-core adapters can also use them (e.g. the star() source)
    • using the limit_zero() macro in place of the literal string: limit 0
    • using dbt_utils.type_* macros instead of explicit datatypes (e.g. dbt_utils.type_timestamp() instead of TIMESTAMP
  • I have updated the README.md (if applicable)
  • I have added tests & descriptions to my models (and macros if applicable)
  • I have added an entry to CHANGELOG.md

@jeremyyeo jeremyyeo changed the title [Fix] Make union_relations include/exclude case insensitive Fix: Make union_relations include/exclude case insensitive May 12, 2022
@jeremyyeo jeremyyeo force-pushed the fix/578-make-union-relations-case-insensitive branch from efee51f to 58bf699 Compare May 16, 2022 09:46
@jeremyyeo
Copy link
Contributor Author

@dbeatty10, added your suggested test but I tweaked it a little to actually include upper/lowercase in the exclude param... wasn't sure if the test previously would have had that or not 😁

@jeremyyeo jeremyyeo force-pushed the fix/578-make-union-relations-case-insensitive branch from 58bf699 to a5fcc7c Compare May 16, 2022 10:08
@jeremyyeo jeremyyeo marked this pull request as ready for review May 17, 2022 19:12
@jeremyyeo jeremyyeo requested a review from dbeatty10 May 17, 2022 19:12
@joellabes joellabes changed the base branch from main to utils-v1 September 14, 2022 01:55
@@ -0,0 +1,4 @@
select
{{ dbt_utils.star(ref("test_union_exclude_base_lowercase"), except=["_dbt_source_relation"]) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

As of #624 and #661, you can pass none into source_column_name to suppress the column from being created, if you'd rather.

@joellabes
Copy link
Contributor

@jeremyyeo I'm going to merge this into the v1 branch, if (in a separate PR) you wanted to change the integration test to exclude the source column it'd make things slightly tidier, but I won't hold this up for that!

@joellabes joellabes merged commit 1789676 into utils-v1 Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

union_relations exclude param not actually excluding
3 participants