Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
shirshanka committed Mar 4, 2025
1 parent cd8d1d6 commit 6c72bbe
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,9 @@ def test_dataset_yaml_loader(ingest_cleanup_data, graph_client):
wait_for_writes_to_sync()

property_name = "io.acryl.dataManagement.deprecationDate"
field_name = "[version=2.0].[type=ClickEvent].[type=string].ip"
assert get_property_from_entity(
make_schema_field_urn(make_dataset_urn("hive", "user.clicks"), "ip"),
make_schema_field_urn(make_dataset_urn("hive", "user.clicks"), field_name),
property_name,
graph=graph_client,
) == ["2023-01-01"]
Expand All @@ -351,19 +352,21 @@ def test_dataset_yaml_loader(ingest_cleanup_data, graph_client):
graph=graph_client,
urn="urn:li:dataset:(urn:li:dataPlatform:hive,user.clicks,PROD)",
)
field_name = "ip"
assert dataset.schema_metadata is not None
assert dataset.schema_metadata.fields is not None
matching_fields = [
f
for f in dataset.schema_metadata.fields
if f.id is not None and Dataset._simplify_field_path(f.id) == field_name
if f.id is not None and f.id == Dataset._simplify_field_path(field_name)
]
assert len(matching_fields) == 1
assert matching_fields[0].structured_properties is not None
assert matching_fields[0].structured_properties[
Urn.make_structured_property_urn("io.acryl.dataManagement.deprecationDate")
] == ["2023-01-01"]
assert (
matching_fields[0].structured_properties[
"io.acryl.dataManagement.deprecationDate"
]
== "2023-01-01"
)


def test_structured_property_search(
Expand Down

0 comments on commit 6c72bbe

Please sign in to comment.