-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ingest): support filtering by fully qualified schema_pattern
- Loading branch information
1 parent
4f7b5ac
commit 57a199b
Showing
6 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
metadata-ingestion/src/datahub/configuration/pattern_utils.py
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,13 @@ | ||
from datahub.configuration.common import AllowDenyPattern | ||
|
||
|
||
def is_schema_allowed( | ||
schema_pattern: AllowDenyPattern, | ||
schema_name: str, | ||
db_name: str, | ||
match_fully_qualified_schema_name: bool, | ||
) -> bool: | ||
if match_fully_qualified_schema_name: | ||
return schema_pattern.allowed(f"{db_name}.{schema_name}") | ||
else: | ||
return schema_pattern.allowed(schema_name) |
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