-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add `OwnershipAssignment` to dbt `VirtualView` * add config for owner assignment target * add quotes to ownership assignment choices description * parse string value with commas as sequence of strings * fix readme example * bump version * fix readme * bump version * Revert "parse string value with commas as sequence of strings" This reverts commit f7ca70f. * bump version --------- Signed-off-by: Tsung-Ju Lii <[email protected]>
- Loading branch information
1 parent
3733d77
commit 63375e0
Showing
12 changed files
with
157 additions
and
14 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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "metaphor-connectors" | ||
version = "0.13.27" | ||
version = "0.13.28" | ||
license = "Apache-2.0" | ||
description = "A collection of Python-based 'connectors' that extract metadata from various sources to ingest into the Metaphor app." | ||
authors = ["Metaphor <[email protected]>"] | ||
|
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
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
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
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 |
---|---|---|
|
@@ -46,7 +46,72 @@ def test_get_ownerships_from_meta(test_root_dir): | |
), | ||
] | ||
|
||
assert get_ownerships_from_meta(meta, meta_ownerships) == expected_ownerships | ||
assert ( | ||
get_ownerships_from_meta(meta, meta_ownerships).materialized_table | ||
== expected_ownerships | ||
) | ||
assert ( | ||
get_ownerships_from_meta(meta, meta_ownerships).dbt_model == expected_ownerships | ||
) | ||
|
||
|
||
def test_get_ownerships_with_assignment_targets(test_root_dir): | ||
meta = { | ||
"owners_dbt_model": ["foo", "bar"], | ||
"owners_materialized_table": ["bar", "qux"], | ||
"owners_both": ["baz"], | ||
} | ||
meta_ownerships = [ | ||
MetaOwnership( | ||
meta_key="owners_dbt_model", | ||
ownership_type="dbt model owner", | ||
email_domain="metaphor.io", | ||
assignment_target="dbt_model", | ||
), | ||
MetaOwnership( | ||
meta_key="owners_both", | ||
ownership_type="owner of both dbt model and materialized table", | ||
email_domain="metaphor.io", | ||
assignment_target="both", | ||
), | ||
MetaOwnership( | ||
meta_key="owners_materialized_table", | ||
ownership_type="materialized table owner", | ||
email_domain="metaphor.io", | ||
assignment_target="materialized_table", | ||
), | ||
] | ||
ownerships = get_ownerships_from_meta(meta, meta_ownerships) | ||
expected_dbt_model_ownerships = [ | ||
Ownership( | ||
contact_designation_name="dbt model owner", | ||
person=str(to_person_entity_id("[email protected]")), | ||
), | ||
Ownership( | ||
contact_designation_name="dbt model owner", | ||
person=str(to_person_entity_id("[email protected]")), | ||
), | ||
Ownership( | ||
contact_designation_name="owner of both dbt model and materialized table", | ||
person=str(to_person_entity_id("[email protected]")), | ||
), | ||
] | ||
expected_materialized_table_ownerships = [ | ||
Ownership( | ||
contact_designation_name="owner of both dbt model and materialized table", | ||
person=str(to_person_entity_id("[email protected]")), | ||
), | ||
Ownership( | ||
contact_designation_name="materialized table owner", | ||
person=str(to_person_entity_id("[email protected]")), | ||
), | ||
Ownership( | ||
contact_designation_name="materialized table owner", | ||
person=str(to_person_entity_id("[email protected]")), | ||
), | ||
] | ||
assert ownerships.dbt_model == expected_dbt_model_ownerships | ||
assert ownerships.materialized_table == expected_materialized_table_ownerships | ||
|
||
|
||
def test_get_tags_from_meta(test_root_dir): | ||
|