Skip to content

Commit

Permalink
[sc-29678] DataQualityMonitor.dataset is an entity ID (#1036)
Browse files Browse the repository at this point in the history
  • Loading branch information
usefulalgorithm authored Nov 6, 2024
1 parent 7d4fce9 commit cc34d58
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
3 changes: 2 additions & 1 deletion metaphor/great_expectations/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
Expand Down
4 changes: 2 additions & 2 deletions tests/great_expectations/expected_basic_sql.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
20 changes: 10 additions & 10 deletions tests/great_expectations/expected_snowflake.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit cc34d58

Please sign in to comment.