-
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.
feat(sdk): structured properties - add support for listing
- Loading branch information
1 parent
03e3f46
commit 261f987
Showing
3 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
metadata-ingestion/examples/structured_properties/list_structured_properties.py
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Usage: python3 list_structured_properties.py | ||
# Expected Output: List of structured properties | ||
# This script lists all structured properties in DataHub | ||
from datahub.api.entities.structuredproperties.structuredproperties import ( | ||
StructuredProperties, | ||
) | ||
from datahub.ingestion.graph.client import get_default_graph | ||
|
||
with get_default_graph() as graph: | ||
structuredproperties = StructuredProperties.list(graph) | ||
for structuredproperty in structuredproperties: | ||
print(structuredproperty.dict()) |
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
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