-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the renamed relations code (#1125)
* Add test and move semantics. * Add field import --------- Co-authored-by: Mila Page <[email protected]> Co-authored-by: Mike Alfare <[email protected]> Co-authored-by: Mike Alfare <[email protected]> (cherry picked from commit 4002483)
- Loading branch information
1 parent
56949d8
commit c668ca5
Showing
3 changed files
with
39 additions
and
4 deletions.
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,6 @@ | ||
kind: Under the Hood | ||
body: Add unit test for transaction semantics. | ||
time: 2024-02-27T00:46:59.188231-08:00 | ||
custom: | ||
Author: versusfacit | ||
Issue: "1123" |
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
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,16 @@ | ||
from dbt.adapters.bigquery.relation import BigQueryRelation | ||
from dbt.adapters.contracts.relation import RelationType | ||
|
||
|
||
def test_renameable_relation(): | ||
relation = BigQueryRelation.create( | ||
database="my_db", | ||
schema="my_schema", | ||
identifier="my_table", | ||
type=RelationType.Table, | ||
) | ||
assert relation.renameable_relations == frozenset( | ||
{ | ||
RelationType.Table, | ||
} | ||
) |