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

redefine type_string for redshift for dbt_project_evaluator's models only #473

Closed
wants to merge 1 commit into from

Conversation

mweso-softserve
Copy link
Contributor

Creates a macro that redefine type_string for models in dbt_project_evaluator package. No need to override it for all models in a project anymore when using package.

This is a:

  • bug fix PR with no breaking changes
  • new functionality

Link to Issue

Closes #469

Description & motivation

There are currently two ways database specific types are redefined for models in this package.
One is by creating a custom macro which is referenced with a dbt_project_evaluator prefix whenever used. See type_large_string.sql and usage example in base_node_columns.sql

The other is by overriding type definition globally for a project which causes all existing models to be changed if they use this type definition.

In my opinion the first way is better because any changes are limited to models in dbt_project_evaluator, that's why I propose this PR.

Integration Test Screenshot

Screenshot 2024-07-03 at 10 43 26

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
    • Databricks
    • DuckDB
    • Trino/Starburst
  • I have updated the README.md (if applicable)
  • I have added tests & descriptions to my models (and macros if applicable)

I tested that on a local version of this package without dispatcher configuration.

…y models in dbt_project_evaluator package. No need to override it for all models in a project anymore when using package.
@mweso-softserve
Copy link
Contributor Author

This approach won't work when dispatcher is configured.

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.

redshift__type_string overwrite is causing all existing models to be marked as modified
1 participant