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

[Feature] Remove dbt-postgres dependency #811

Open
mikealfare opened this issue May 3, 2024 · 3 comments
Open

[Feature] Remove dbt-postgres dependency #811

mikealfare opened this issue May 3, 2024 · 3 comments

Comments

@mikealfare
Copy link
Contributor

mikealfare commented May 3, 2024

Describe the feature

dbt-redshift depends on dbt-postgres for 8 macros. These are all "pass-through" macros, e.g.:

{% macro redshift__create_schema(relation) -%}
  {{ postgres__create_schema(relation) }}
{% endmacro %}

We can eliminate the dependency on dbt-postgres through a combination of vendoring the dbt-postgres macros into dbt-redshift and simply relying on the default in dbt-adapters.

Tasks

  • remove references to dbt-postgres macros (currently 7 instances in adapters.sql and 1 in snapshot_merge.sql)
  • remove the dependency in adapters.redshift.__init__.py
  • remove reference to dbt-postgres in tests (currently 1 in test_macros.py, 1 in test_query_comment.py, and 1 comment in unit/utils.py)
  • remove dependency in setup.py and dev-requirements.txt
  • update docs to reflect that postgres macros will no longer be available to use in custom macros; include the workaround of simply replacing postgres__ with redshift__ to get the new macro
@mikealfare mikealfare added enhancement New feature or request triage tech_debt and removed enhancement New feature or request triage labels May 3, 2024
@colin-rogers-dbt
Copy link
Contributor

Need to communicate that this would break any redshift user who is depending on overwriting a postgres macro.

@padbk
Copy link

padbk commented May 17, 2024

This change would be much appreciated.

dbt-postgres 1.8.0 is creating issues for those running Linux due to a change in Psycopg2 dependencies, see dbt-labs/dbt-postgres#96

dbt-redshift does not need Psycopg2 anymore, so removing this dependency is a much needed simplfication. 🙏

@jtcohen6
Copy link
Contributor

We've identified a blocker for this work:

@mikealfare mikealfare removed their assignment Dec 11, 2024
@mikealfare mikealfare added enhancement New feature or request and removed enhancement New feature or request labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants