mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-03 23:28:11 +00:00
20 lines
527 B
Python
20 lines
527 B
Python
![]() |
from datahub.sdk import DataHubClient, Dataset
|
||
|
|
||
|
client = DataHubClient.from_env()
|
||
|
|
||
|
properties_urn1 = "urn:li:structuredProperty:sp1"
|
||
|
properties_urn2 = "urn:li:structuredProperty:sp2"
|
||
|
|
||
|
|
||
|
dataset = Dataset(
|
||
|
name="example_dataset",
|
||
|
platform="snowflake",
|
||
|
description="airflow pipeline for production",
|
||
|
structured_properties={properties_urn1: ["PROD"], properties_urn2: [100.0]},
|
||
|
)
|
||
|
|
||
|
# update the structured properties
|
||
|
dataset.set_structured_property(properties_urn1, ["PROD", "DEV"])
|
||
|
|
||
|
client.entities.upsert(dataset)
|