2025-08-21 14:51:11 -07:00
|
|
|
from datahub.sdk import DataHubClient, MLPrimaryKeyUrn
|
2023-09-19 09:02:24 -07:00
|
|
|
|
2025-08-21 14:51:11 -07:00
|
|
|
client = DataHubClient.from_env()
|
2023-09-19 09:02:24 -07:00
|
|
|
|
2025-08-21 14:51:11 -07:00
|
|
|
# Or get this from the UI (share -> copy urn) and use MLPrimaryKeyUrn.from_string(...)
|
|
|
|
|
mlprimarykey_urn = MLPrimaryKeyUrn("user_features", "user_id")
|
2023-09-19 09:02:24 -07:00
|
|
|
|
2025-08-21 14:51:11 -07:00
|
|
|
mlprimarykey_entity = client.entities.get(mlprimarykey_urn)
|
|
|
|
|
print("MLPrimaryKey name:", mlprimarykey_entity.name)
|
|
|
|
|
print("MLPrimaryKey feature table:", mlprimarykey_entity.feature_table_urn)
|
|
|
|
|
print("MLPrimaryKey description:", mlprimarykey_entity.description)
|