-
Notifications
You must be signed in to change notification settings - Fork 163
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
Implement initial adapter tests on bigquery #142
Conversation
from dbt.tests.adapter.basic.test_snapshot_timestamp import BaseSnapshotTimestamp | ||
|
||
""" | ||
Trying to create view `dbt-dev-168022`.`test16473926894805161392_test_basic`.`swappable`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jtcohen6 What is your take on how to avoid this error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gshank This is a "good" error! And it doesn't look like we have any existing integration tests to confirm that this "good" error is raised in this case, so I'd also call this a "good" test case :)
I think we could take either/both of these approaches:
- xfail the standard test with this error message — it looks
- inherit + reimplement the standard test, adding in
--full-refresh
, so that it can succeed
Maybe both, if that's straightforward enough to do?
85dd272
to
092b965
Compare
092b965
to
07b704e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
|
||
class TestSimpleMaterializationsBigQuery(BaseSimpleMaterializations): | ||
# This test requires a full-refresh to replace a table with a view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider add this kind of logic to the dbt-core tests later on so that we don't need to do it anywhere in bigquery?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test_config sets a flag which does initiate different behavior in the dbt-core tests. I think we don't want to always do a full refresh in the adapter tests, because then we wouldn't ever be testing behavior without the full refresh, which ought to work for the other adapters.
resolves #135
Description
Initial implementation of tests ported from dbt-adapter-tests
Checklist
CHANGELOG.md
and added information about my change to the "dbt-bigquery next" section.