-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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-691] why isn't postgres_get_relations
double-underscored?
#5301
Comments
postgres_get_relations
double-underscored?postgres_get_relations
double-underscored?
postgres_get_relations
double-underscored?postgres_get_relations
double-underscored?
@dataders I don't think there's a very good reason :) want to change it? (We should leave the old macro name in place, in case anyone has overridden it by that name, to avoid breaking changes in upgrade.) My best guess: for "internal" macros, which are specific to one adapter, and shouldn't accidentally interfere with real adapter dispatch, we opted for normal-ish snake case names, rather than the dunder prefix. See, for instance, For what it's worth, this has caused me some slight issues when working on the "experimental package" for materialized views as well, since that requires a minor alteration to |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
Thanks @dbeatty10 In terms of any pre-reqs, is there anything I need to know before I get started (from the dbt docs) ? I would also like to know how can I replicate the usage locally. |
@alzaar you can set up your machine for local development using our contributing instructions (which include a local Postgres database using Docker). Then you can create a local dbt project via Create this file:
Run it and see the results: dbt compile -s test_macro After you've done your implementation, then you should be able to change |
for dbt-greenplum, @markporoshin wants to inherit this macro without copying it. is there a reason it isn't double-underscored? Currently, the workaround is to modify this line in
impl.py
dbt-core/plugins/postgres/dbt/adapters/postgres/impl.py
Lines 15 to 16 in 10b27b9
to be this:
but I don't know why!
dbt-core/plugins/postgres/dbt/include/postgres/macros/relations.sql
Line 1 in 10b27b9
The text was updated successfully, but these errors were encountered: