-
Notifications
You must be signed in to change notification settings - Fork 92
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
Migrate to dbt-common + dbt-adapters #342
Merged
jwills
merged 20 commits into
duckdb:master
from
jtcohen6:jerco/migrate-dbt-common-adapters-interfaces
May 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
1e25859
Migrate to dbt-common + dbt-adapters
jtcohen6 86eface
Try different install reqs
jtcohen6 2d36968
Fix unit tests
jtcohen6 3ad787e
Bonus: functional tests for dbt unit testing
jtcohen6 d4d5939
bump dbt-common and dbt-adapters to 1.0.0b1
MichelleArk 10034b3
Merge branch 'master' into jerco/migrate-dbt-common-adapters-interfaces
MichelleArk 5712711
implement DuckDbRelation.create_from, fix TestExternalSources::test_e…
MichelleArk af5f989
Merge branch 'master' into jerco/migrate-dbt-common-adapters-interfaces
MichelleArk 9c8113a
use RelationConfig attributes in create_from_source
MichelleArk 80b709d
Merge branch 'master' into jerco/migrate-dbt-common-adapters-interfaces
MichelleArk b8fdca0
formatting + initial mypy fixes
MichelleArk 6527752
Merge branch 'master' into jerco/migrate-dbt-common-adapters-interfaces
jtcohen6 9a0ba02
Revert dev-requirements
jtcohen6 6dcc39c
Readd dbt-tests-adapter
jtcohen6 5f594c4
Readd dbt-core to setup.py for install back-compat
jtcohen6 8511b94
Merge branch 'master' into jerco/migrate-dbt-common-adapters-interfaces
jtcohen6 0750e0c
Merge remote-tracking branch 'origin/master' into jerco/migrate-dbt-c…
jtcohen6 a85cef9
Skip BV for TestUnitTestingTypesDuckDB
jtcohen6 298f27c
Merge branch 'master' into jerco/migrate-dbt-common-adapters-interfaces
jwills 08d5530
Merge branch 'master' into jerco/migrate-dbt-common-adapters-interfaces
jwills File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Bonus: functional tests for dbt unit testing
- Loading branch information
commit 3ad787e1a2406c6db50968edd8c8d06595a02c4e
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import pytest | ||
|
||
from dbt.tests.adapter.unit_testing.test_types import BaseUnitTestingTypes | ||
from dbt.tests.adapter.unit_testing.test_case_insensitivity import BaseUnitTestCaseInsensivity | ||
from dbt.tests.adapter.unit_testing.test_invalid_input import BaseUnitTestInvalidInput | ||
|
||
|
||
class TestUnitTestingTypesDuckDB(BaseUnitTestingTypes): | ||
@pytest.fixture | ||
def data_types(self): | ||
# sql_value, yaml_value | ||
return [ | ||
["1", "1"], | ||
["2.0", "2.0"], | ||
["'12345'", "12345"], | ||
["'string'", "string"], | ||
["true", "true"], | ||
["DATE '2020-01-02'", "2020-01-02"], | ||
["TIMESTAMP '2013-11-03 00:00:00-0'", "2013-11-03 00:00:00-0"], | ||
["'2013-11-03 00:00:00-0'::TIMESTAMPTZ", "2013-11-03 00:00:00-0"], | ||
[ | ||
"{'Alberta':'Edmonton','Manitoba':'Winnipeg'}", | ||
"{'Alberta':'Edmonton','Manitoba':'Winnipeg'}", | ||
], | ||
["ARRAY['a','b','c']", "['a','b','c']"], | ||
["ARRAY[1,2,3]", "[1, 2, 3]"], | ||
] | ||
|
||
|
||
class TestUnitTestCaseInsensitivityDuckDB(BaseUnitTestCaseInsensivity): | ||
pass | ||
|
||
|
||
class TestUnitTestInvalidInputDuckDB(BaseUnitTestInvalidInput): | ||
pass |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@jwills I pulled these in (selfishly), since it seemed like unit testing might "just work" on
dbt-duckdb
with the v1.8 interface updates.It's all well & good on the Real Duck, but it looks like the test is failing on BuenaVista for the last data type in the list (
ARRAY[1,2,3]
):How would you feel about me adding
@pytest.mark.skip_profile("buenavista")
to this test? I know that adds a bit of tech debt / mystery for you later onThere 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.
I think that’s just because I don’t properly support array types in the BV Postgres serialization, so it’s perfectly understandable and okay to mark it as skipped