Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions metadata-ingestion/src/datahub/cli/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def post_rollback_endpoint(
unsafe_entity_count = summary.get("unsafeEntitiesCount", 0)
unsafe_entities = summary.get("unsafeEntities", [])
rolled_back_aspects = list(
filter(lambda row: row["runId"] == payload_obj["runId"], rows)
filter(lambda row: row.get("runId") == payload_obj.get("runId"), rows)
)

if len(rows) == 0:
Expand Down Expand Up @@ -424,7 +424,8 @@ def get_urns_by_filter(
"filter": {"or": [{"and": filter_criteria}]},
}
payload = json.dumps(search_body)
log.debug(payload)
log.debug(f"url={url}")
log.debug(f"payload={payload}")
response: Response = session.post(url, payload)
if response.status_code == 200:
assert response._content
Expand Down
2 changes: 2 additions & 0 deletions metadata-models-custom/example_loader/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/zsh
../gradlew -PprojVersion=0.0.2 clean build install
2 changes: 2 additions & 0 deletions metadata-models-custom/example_loader/loader.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/zsh
datahub put --urn "urn:li:dataset:(urn:li:dataPlatform:hive,SampleHiveDataset,PROD)" --aspect privacyInfo -d privacy_info.json
5 changes: 5 additions & 0 deletions metadata-models-custom/example_loader/privacy_info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"policy_id": "gdpr_policy",
"privacy_compliant": "False",
"privacy_last_enforcement_time": 1000000
}
1 change: 1 addition & 0 deletions metadata-models-custom/registry/entity-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ entities:
- name: dataset
aspects:
- customDataQualityRules
- privacyInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace com.mycompany.privacy

@Aspect = {
"name": "privacyInfo",
"autoRender": true,
"renderSpec": {
"displayType": "properties", // or properties
"displayName": "Privacy"
}
}
record PrivacyInfo {
policy_id: optional string

@Searchable = {
"fieldType": "KEYWORD",
"addToFilters": true,
}
privacy_compliant: optional string

privacy_last_enforcement_time: optional long
}