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

remove list_relations call in materialization #84

Merged
merged 4 commits into from
Oct 17, 2018

Conversation

beckjake
Copy link
Contributor

@beckjake beckjake commented Oct 1, 2018

The caching PR I wrote removes list_relations from the DBWrapper, so remove the explicit call from the materialization.

This change is backwards compatible: Currently in the absence of a relations_list, the adapter code calls list_relations on its own.

@beckjake beckjake requested a review from drewbanin October 1, 2018 16:18
@@ -0,0 +1,16 @@
{{
Copy link
Contributor

@drewbanin drewbanin Oct 17, 2018

Choose a reason for hiding this comment

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

Can we do something hacky to get these tests to pass? Let's just not configure this model for Postgres, making it use the view materialization instead

Suggested change
{{
{% if target.type != 'postgres' %}
{{
...
}}
{% endif %}

Via: https://github.com/fishtown-analytics/dbt-utils/blob/master/integration_tests/models/cross_db_utils/test_datediff.sql

Copy link
Contributor

Choose a reason for hiding this comment

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

^ I guess this fails during parsing? Boo. Might be worth just implementing that if/else block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It turns out that the circlei script doesn't run the makefile, I just made the circle config match.

dbt run --target postgres
dbt test --target postgres
dbt run --target postgres --exclude test_insert_by_period
dbt test --target postgres --exclude test_insert_by_period
Copy link
Contributor

Choose a reason for hiding this comment

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

that is a lot smarter than what i said

@beckjake beckjake force-pushed the remove-list-relations branch 2 times, most recently from 2be3f34 to a58e1ca Compare October 17, 2018 20:24
@beckjake beckjake force-pushed the remove-list-relations branch from a58e1ca to de24e58 Compare October 17, 2018 20:26
Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

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

LGTM

@beckjake beckjake merged commit d2139c2 into master Oct 17, 2018
@beckjake beckjake deleted the remove-list-relations branch October 17, 2018 20:40
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.

2 participants