-
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.
- Loading branch information
1 parent
b205302
commit b3ab4fc
Showing
1 changed file
with
9 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 |
---|---|---|
@@ -1,11 +1,14 @@ | ||
from datahub.configuration.datetimes import parse_absolute_time | ||
from datahub.metadata.urns import CorpUserUrn | ||
from datahub.sql_parsing.sql_parsing_aggregator import PreparsedQuery | ||
from datahub.sql_parsing.tool_meta_extractor import ToolMetaExtractor | ||
from datahub.sql_parsing.tool_meta_extractor import ( | ||
ToolMetaExtractor, | ||
ToolMetaExtractorReport, | ||
) | ||
|
||
|
||
def test_extract_mode_metadata() -> None: | ||
extractor = ToolMetaExtractor() | ||
extractor = ToolMetaExtractor(report=ToolMetaExtractorReport()) | ||
query = """\ | ||
select * from LONG_TAIL_COMPANIONS.ADOPTION.PET_PROFILES | ||
LIMIT 100 | ||
|
@@ -31,7 +34,9 @@ def test_extract_mode_metadata() -> None: | |
|
||
|
||
def test_extract_looker_metadata() -> None: | ||
extractor = ToolMetaExtractor(looker_user_mapping={"7": "[email protected]"}) | ||
extractor = ToolMetaExtractor( | ||
report=ToolMetaExtractorReport(), looker_user_mapping={"7": "[email protected]"} | ||
) | ||
looker_query = """\ | ||
SELECT | ||
all_entities_extended_sibling."ENTITY" AS "all_entities_extended_sibling.entity_type", | ||
|
@@ -63,7 +68,7 @@ def test_extract_looker_metadata() -> None: | |
|
||
|
||
def test_extract_no_metadata() -> None: | ||
extractor = ToolMetaExtractor() | ||
extractor = ToolMetaExtractor(report=ToolMetaExtractorReport()) | ||
query = """\ | ||
select * from LONG_TAIL_COMPANIONS.ADOPTION.PET_PROFILES | ||
LIMIT 100 | ||
|