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

Replacing cte in deduplicate macro with subquery #842

Closed

Conversation

NagarajNune
Copy link

@NagarajNune NagarajNune commented Sep 30, 2023

This PR is to handle a syntax issue which arises in default deduplicate macro when using it in the end result of CTE. In this PR I replaced CTE with Subquery to mitigate the issue.

Resolves #642

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

Checklist

  • This code is associated with an Issue which has been triaged and accepted for development.
  • 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.type_* macros instead of explicit datatypes (e.g. dbt.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

@NagarajNune NagarajNune changed the title Replacing cte in deduplicate macro with subquery Replacing cte in deduplicate macro with subquery #642 Sep 30, 2023
@NagarajNune NagarajNune changed the title Replacing cte in deduplicate macro with subquery #642 Replacing cte in deduplicate macro with subquery Sep 30, 2023
Copy link

This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Mar 29, 2024
Copy link

github-actions bot commented Apr 5, 2024

Although we are closing this PR as stale, it can still be reopened to continue development. Just add a comment to notify the maintainers.

@github-actions github-actions bot closed this Apr 5, 2024
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.

Deduplicate macro adds additional "with: clause, fails with a cte
2 participants