diff --git a/metaphor/great_expectations/extractor.py b/metaphor/great_expectations/extractor.py index 1fd0ac4b..c744d323 100644 --- a/metaphor/great_expectations/extractor.py +++ b/metaphor/great_expectations/extractor.py @@ -14,6 +14,7 @@ from metaphor.common.entity_id import ( dataset_normalized_name, parts_to_dataset_entity_id, + to_dataset_entity_id_from_logical_id, ) from metaphor.common.event_util import ENTITY_TYPES from metaphor.common.logger import get_logger @@ -212,7 +213,7 @@ def _parse_result_targets( assert dataset.logical_id and dataset.logical_id.name targets = [ DataMonitorTarget( - dataset=dataset.logical_id.name, + dataset=str(to_dataset_entity_id_from_logical_id(dataset.logical_id)), column=result.expectation_config.kwargs["column"], ) for result in validation_result.results diff --git a/pyproject.toml b/pyproject.toml index d221840e..7d81bf3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "metaphor-connectors" -version = "0.14.148" +version = "0.14.149" 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 "] diff --git a/tests/great_expectations/expected_basic_sql.json b/tests/great_expectations/expected_basic_sql.json index 4d70b4aa..c2ab06a9 100644 --- a/tests/great_expectations/expected_basic_sql.json +++ b/tests/great_expectations/expected_basic_sql.json @@ -7,11 +7,11 @@ "targets": [ { "column": "passenger_count", - "dataset": "gx_example_db.nyc_taxi_data" + "dataset": "DATASET~C31AF1096D54CAFC2FE971910950658C" }, { "column": "fare_amount", - "dataset": "gx_example_db.nyc_taxi_data" + "dataset": "DATASET~C31AF1096D54CAFC2FE971910950658C" } ], "title": "expectations" diff --git a/tests/great_expectations/expected_snowflake.json b/tests/great_expectations/expected_snowflake.json index 6ba4c565..a28e04df 100644 --- a/tests/great_expectations/expected_snowflake.json +++ b/tests/great_expectations/expected_snowflake.json @@ -10,19 +10,19 @@ "targets": [ { "column": "END_DATE", - "dataset": "acme.berlin_bicycles.cycle_hire" + "dataset": "DATASET~F0C9B26420A687DD5EFC906351F8540A" }, { "column": "RENTAL_ID", - "dataset": "acme.berlin_bicycles.cycle_hire" + "dataset": "DATASET~F0C9B26420A687DD5EFC906351F8540A" }, { "column": "RENTAL_ID", - "dataset": "acme.berlin_bicycles.cycle_hire" + "dataset": "DATASET~F0C9B26420A687DD5EFC906351F8540A" }, { "column": "PRICING_TIER", - "dataset": "acme.berlin_bicycles.cycle_hire" + "dataset": "DATASET~F0C9B26420A687DD5EFC906351F8540A" } ], "title": "ACME_BERLIN_BICYCLES_CYCLE_HIRE-expectations" @@ -44,19 +44,19 @@ "targets": [ { "column": "PRICING_TIER", - "dataset": "acme.berlin_bicycles.cycle_stations" + "dataset": "DATASET~221DEF4E5CF338DA5E3CD9F86862E9AD" }, { "column": "LATITUDE", - "dataset": "acme.berlin_bicycles.cycle_stations" + "dataset": "DATASET~221DEF4E5CF338DA5E3CD9F86862E9AD" }, { "column": "LATITUDE", - "dataset": "acme.berlin_bicycles.cycle_stations" + "dataset": "DATASET~221DEF4E5CF338DA5E3CD9F86862E9AD" }, { "column": "LATITUDE", - "dataset": "acme.berlin_bicycles.cycle_stations" + "dataset": "DATASET~221DEF4E5CF338DA5E3CD9F86862E9AD" } ], "title": "ACME_BERLIN_BICYCLES_CYCLE_STATIONS-expectations" @@ -78,11 +78,11 @@ "targets": [ { "column": "TOTAL_MINUTES", - "dataset": "acme.ride_share.cleaned_bike_rides" + "dataset": "DATASET~92D9D4AFB0BA1FAE857D2F67B1C5651F" }, { "column": "SAME_STATION_FLAG", - "dataset": "acme.ride_share.cleaned_bike_rides" + "dataset": "DATASET~92D9D4AFB0BA1FAE857D2F67B1C5651F" } ], "title": "ACME_RIDE_SHARE_CLEANED_BIKE_RIDES-expectations"