Skip to main content
Version: Next

URNs

ApplicationUrn

class datahub.metadata.urns.ApplicationUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:

ENTITY_TYPE : ClassVar[Literal['application']] = 'application'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

AssertionUrn

class datahub.metadata.urns.AssertionUrn(assertion_id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • assertion_id (Union[AssertionUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['assertion']] = 'assertion'

property assertion_id : str

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

BusinessAttributeUrn

class datahub.metadata.urns.BusinessAttributeUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['businessAttribute']] = 'businessAttribute'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

ChartUrn

class datahub.metadata.urns.ChartUrn(dashboard_tool, chart_id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • dashboard_tool (str)
    • chart_id (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['chart']] = 'chart'

property chart_id : str

classmethod create_from_ids(platform, name, platform_instance=None)

  • Parameters:
    • platform (str)
    • name (str)
    • platform_instance (Optional[str])
  • Return type:ChartUrn

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property dashboard_tool : str

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

ContainerUrn

class datahub.metadata.urns.ContainerUrn(guid, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • guid (Union[ContainerUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['container']] = 'container'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property guid : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

CorpGroupUrn

class datahub.metadata.urns.CorpGroupUrn(name, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • name (Union[CorpGroupUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['corpGroup']] = 'corpGroup'

classmethod create_from_id(id)

Deprecated

Deprecated since version 0.12.0.2: Use the constructor instead

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

CorpUserUrn

class datahub.metadata.urns.CorpUserUrn(username, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • username (Union[CorpUserUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['corpuser']] = 'corpuser'

classmethod create_from_id(id)

Deprecated

Deprecated since version 0.12.0.2: Use the constructor instead

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

property username : str

DashboardUrn

class datahub.metadata.urns.DashboardUrn(dashboard_tool, dashboard_id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • dashboard_tool (str)
    • dashboard_id (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['dashboard']] = 'dashboard'

classmethod create_from_ids(platform, name, platform_instance=None)

  • Parameters:
    • platform (str)
    • name (str)
    • platform_instance (Optional[str])
  • Return type:DashboardUrn

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property dashboard_id : str

property dashboard_tool : str

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataContractUrn

class datahub.metadata.urns.DataContractUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:

ENTITY_TYPE : ClassVar[Literal['dataContract']] = 'dataContract'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataFlowUrn

class datahub.metadata.urns.DataFlowUrn(orchestrator, flow_id, cluster, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • orchestrator (str)
    • flow_id (str)
    • cluster (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['dataFlow']] = 'dataFlow'

property cluster : str

classmethod create_from_ids(orchestrator, flow_id, env, platform_instance=None)

  • Parameters:
    • orchestrator (str)
    • flow_id (str)
    • env (str)
    • platform_instance (Optional[str])
  • Return type:DataFlowUrn

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

property flow_id : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

get_env()

Deprecated

Deprecated since version 0.12.0.2: Use .cluster instead

  • Return type:str

get_flow_id()

Deprecated

Deprecated since version 0.12.0.2: Use .flow_id instead

  • Return type:str

get_orchestrator_name()

Deprecated

Deprecated since version 0.12.0.2: Use .orchestrator instead

  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property orchestrator : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubAccessTokenUrn

class datahub.metadata.urns.DataHubAccessTokenUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubAccessToken']] = 'dataHubAccessToken'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubActionUrn

class datahub.metadata.urns.DataHubActionUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubAction']] = 'dataHubAction'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubConnectionUrn

class datahub.metadata.urns.DataHubConnectionUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubConnection']] = 'dataHubConnection'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubExecutionRequestUrn

class datahub.metadata.urns.DataHubExecutionRequestUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubExecutionRequest']] = 'dataHubExecutionRequest'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubIngestionSourceUrn

class datahub.metadata.urns.DataHubIngestionSourceUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubIngestionSource']] = 'dataHubIngestionSource'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubOpenAPISchemaUrn

class datahub.metadata.urns.DataHubOpenAPISchemaUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubOpenAPISchema']] = 'dataHubOpenAPISchema'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubPersonaUrn

class datahub.metadata.urns.DataHubPersonaUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubPersona']] = 'dataHubPersona'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubPolicyUrn

class datahub.metadata.urns.DataHubPolicyUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubPolicy']] = 'dataHubPolicy'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubRetentionUrn

class datahub.metadata.urns.DataHubRetentionUrn(entity_name, aspect_name, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • entity_name (str)
    • aspect_name (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['dataHubRetention']] = 'dataHubRetention'

property aspect_name : str

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_name : str

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubRoleUrn

class datahub.metadata.urns.DataHubRoleUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:

ENTITY_TYPE : ClassVar[Literal['dataHubRole']] = 'dataHubRole'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubSecretUrn

class datahub.metadata.urns.DataHubSecretUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubSecret']] = 'dataHubSecret'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubStepStateUrn

class datahub.metadata.urns.DataHubStepStateUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubStepState']] = 'dataHubStepState'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubUpgradeUrn

class datahub.metadata.urns.DataHubUpgradeUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataHubUpgrade']] = 'dataHubUpgrade'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataHubViewUrn

class datahub.metadata.urns.DataHubViewUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:

ENTITY_TYPE : ClassVar[Literal['dataHubView']] = 'dataHubView'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataJobUrn

class datahub.metadata.urns.DataJobUrn(flow, job_id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • flow (Union[DataFlowUrn, str]) –
    • job_id (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['dataJob']] = 'dataJob'

classmethod create_from_ids(data_flow_urn, job_id)

  • Parameters:
    • data_flow_urn (str)
    • job_id (str)
  • Return type:DataJobUrn

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

property flow : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

get_data_flow_urn()

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

get_job_id()

Deprecated

Deprecated since version 0.12.0.2: Use .job_id instead

  • Return type:str

property job_id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataPlatformInstanceUrn

class datahub.metadata.urns.DataPlatformInstanceUrn(platform, instance, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • platform (Union[DataPlatformUrn, str]) –
    • instance (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['dataPlatformInstance']] = 'dataPlatformInstance'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property instance : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property platform : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataPlatformUrn

class datahub.metadata.urns.DataPlatformUrn(platform_name, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • platform_name (Union[DataPlatformUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['dataPlatform']] = 'dataPlatform'

classmethod create_from_id(id)

Deprecated

Deprecated since version 0.12.0.2: Use the constructor instead

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property platform_name : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataProcessInstanceUrn

class datahub.metadata.urns.DataProcessInstanceUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['dataProcessInstance']] = 'dataProcessInstance'

classmethod create_from_id(id)

Deprecated

Deprecated since version 0.12.0.2: Use the constructor instead

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

get_dataprocessinstance_id()

Deprecated

Deprecated since version 0.12.0.2: Use .id instead

  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataProcessUrn

class datahub.metadata.urns.DataProcessUrn(name, orchestrator, env = 'PROD', *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • name (str)
    • orchestrator (str)
    • env (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['dataProcess']] = 'dataProcess'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

property env : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

property orchestrator : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataProductUrn

class datahub.metadata.urns.DataProductUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:

ENTITY_TYPE : ClassVar[Literal['dataProduct']] = 'dataProduct'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DataTypeUrn

class datahub.metadata.urns.DataTypeUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • id (Union[DataTypeUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['dataType']] = 'dataType'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DatasetUrn

class datahub.metadata.urns.DatasetUrn(platform, name, env = 'PROD', *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • platform (Union[DataPlatformUrn, str]) –
    • name (str)
    • env (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['dataset']] = 'dataset'

classmethod create_from_ids(platform_id, table_name, env, platform_instance=None)

  • Parameters:
    • platform_id (str)
    • table_name (str)
    • env (str)
    • platform_instance (Optional[str])
  • Return type:DatasetUrn

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

property env : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

get_data_platform_urn()

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

get_dataset_name()

Deprecated

Deprecated since version 0.12.0.2: Use .name instead

  • Return type:str

get_env()

Deprecated

Deprecated since version 0.12.0.2: Use .env instead

  • Return type:str

static get_simple_field_path_from_v2_field_path()

A helper function to extract simple . path notation from the v2 field path

Deprecated

Deprecated since version 0.12.0.2: Use the function from the field_paths module instead

  • Parameters:field_path (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

property platform : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

DomainUrn

class datahub.metadata.urns.DomainUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • id (Union[DomainUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['domain']] = 'domain'

classmethod create_from_id(id)

Deprecated

Deprecated since version 0.12.0.2: Use the constructor instead

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

EntityTypeUrn

class datahub.metadata.urns.EntityTypeUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:

ENTITY_TYPE : ClassVar[Literal['entityType']] = 'entityType'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

ErModelRelationshipUrn

class datahub.metadata.urns.ErModelRelationshipUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['erModelRelationship']] = 'erModelRelationship'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

FormUrn

class datahub.metadata.urns.FormUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • id (Union[FormUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['form']] = 'form'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

GlobalSettingsUrn

class datahub.metadata.urns.GlobalSettingsUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['globalSettings']] = 'globalSettings'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

GlossaryNodeUrn

class datahub.metadata.urns.GlossaryNodeUrn(name, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:

ENTITY_TYPE : ClassVar[Literal['glossaryNode']] = 'glossaryNode'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

GlossaryTermUrn

class datahub.metadata.urns.GlossaryTermUrn(name, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:

ENTITY_TYPE : ClassVar[Literal['glossaryTerm']] = 'glossaryTerm'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

IncidentUrn

class datahub.metadata.urns.IncidentUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • id (Union[IncidentUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['incident']] = 'incident'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

InviteTokenUrn

class datahub.metadata.urns.InviteTokenUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:

ENTITY_TYPE : ClassVar[Literal['inviteToken']] = 'inviteToken'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

MlFeatureTableUrn

class datahub.metadata.urns.MlFeatureTableUrn(platform, name, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • platform (Union[DataPlatformUrn, str]) –
    • name (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['mlFeatureTable']] = 'mlFeatureTable'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

property platform : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

MlFeatureUrn

class datahub.metadata.urns.MlFeatureUrn(feature_namespace, name, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • feature_namespace (str)
    • name (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['mlFeature']] = 'mlFeature'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

property feature_namespace : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

MlModelDeploymentUrn

class datahub.metadata.urns.MlModelDeploymentUrn(platform, name, env = 'PROD', *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • platform (Union[DataPlatformUrn, str]) –
    • name (str)
    • env (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['mlModelDeployment']] = 'mlModelDeployment'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

property env : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

property platform : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

MlModelGroupUrn

class datahub.metadata.urns.MlModelGroupUrn(platform, name, env = 'PROD', *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • platform (Union[DataPlatformUrn, str]) –
    • name (str)
    • env (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['mlModelGroup']] = 'mlModelGroup'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

property env : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

property platform : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

MlModelUrn

class datahub.metadata.urns.MlModelUrn(platform, name, env = 'PROD', *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • platform (Union[DataPlatformUrn, str]) –
    • name (str)
    • env (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['mlModel']] = 'mlModel'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

property env : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

property platform : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

MlPrimaryKeyUrn

class datahub.metadata.urns.MlPrimaryKeyUrn(feature_namespace, name, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • feature_namespace (str)
    • name (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['mlPrimaryKey']] = 'mlPrimaryKey'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

property feature_namespace : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

NotebookUrn

class datahub.metadata.urns.NotebookUrn(notebook_tool, notebook_id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • notebook_tool (str)
    • notebook_id (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['notebook']] = 'notebook'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

get_notebook_id()

Deprecated

Deprecated since version 0.12.0.2: Use .notebook_id instead

  • Return type:str

get_platform_id()

Deprecated

Deprecated since version 0.12.0.2: Use .notebook_tool instead

  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property notebook_id : str

property notebook_tool : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

OwnershipTypeUrn

class datahub.metadata.urns.OwnershipTypeUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['ownershipType']] = 'ownershipType'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

PlatformResourceUrn

class datahub.metadata.urns.PlatformResourceUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['platformResource']] = 'platformResource'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

PostUrn

class datahub.metadata.urns.PostUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • id (Union[PostUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['post']] = 'post'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

QueryUrn

class datahub.metadata.urns.QueryUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • id (Union[QueryUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['query']] = 'query'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

RoleUrn

class datahub.metadata.urns.RoleUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • id (Union[RoleUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['role']] = 'role'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

SchemaFieldUrn

class datahub.metadata.urns.SchemaFieldUrn(parent, field_path, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • parent (Union[Urn, str]) –
    • field_path (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['schemaField']] = 'schemaField'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

property field_path : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property parent : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

StructuredPropertyUrn

class datahub.metadata.urns.StructuredPropertyUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

ENTITY_TYPE : ClassVar[Literal['structuredProperty']] = 'structuredProperty'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

TagUrn

class datahub.metadata.urns.TagUrn(name, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • name (Union[TagUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['tag']] = 'tag'

classmethod create_from_id(id)

Deprecated

Deprecated since version 0.12.0.2: Use the constructor instead

  • Parameters:id (str)
  • Return type:TagUrn

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

TelemetryUrn

class datahub.metadata.urns.TelemetryUrn(name, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • name (Union[TelemetryUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['telemetry']] = 'telemetry'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

property name : str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

TestUrn

class datahub.metadata.urns.TestUrn(id, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • id (Union[TestUrn, str]) –
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['test']] = 'test'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

Urn

class datahub.metadata.urns.Urn(entity_type, entity_id)

Bases: object

URNs are globally unique identifiers used to refer to entities.

It will be in format of urn:li:<type>:<id> or urn:li:<type>:(<id1>,<id2>,…)

A note on encoding: certain characters, particularly commas and parentheses, are not allowed in string portions of the URN. However, these are allowed when the urn has another urn embedded within it. The main URN class ignores this possibility, and assumes that the user provides a valid URN string. However, the specific URN classes, such as DatasetUrn, will automatically encode these characters using url-encoding when the URN is created and _allow_coercion is enabled (the default). However, all from_string methods will try to preserve the string as-is, and will raise an error if the string is invalid.

  • Parameters:
    • entity_type (str)
    • entity_id (List[str])

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str

VersionSetUrn

class datahub.metadata.urns.VersionSetUrn(id, entity_type, *, _allow_coercion = True)

Bases: _SpecificUrn

  • Parameters:
    • id (str)
    • entity_type (str)
    • _allow_coercion (bool) –

ENTITY_TYPE : ClassVar[Literal['versionSet']] = 'versionSet'

classmethod create_from_string(urn_str)

  • Parameters:urn_str (str)
  • Return type:Self

property entity_ids : List[str]

property entity_type : str

classmethod from_key_aspect(key_aspect)

classmethod from_string(urn_str, /)

Create an Urn from its string representation.

When called against the base Urn class, this method will return a more specific Urn type where possible.

>>> from datahub.metadata.urns import DatasetUrn, Urn
>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> urn = Urn.from_string(urn_str)
>>> assert isinstance(urn, DatasetUrn)

When called against a specific Urn type (e.g. DatasetUrn.from_string), this method can also be used for type narrowing.

>>> urn_str = 'urn:li:dataset:(urn:li:dataPlatform:snowflake,my_db.my_schema.my_table,PROD)'
>>> assert DatasetUrn.from_string(urn_str)
  • Parameters:urn_str (Union[str, Urn]) – The string representation of the urn. Also accepts an existing Urn instance.
  • Return type:Self
  • Returns: Urn of the given string representation.
  • Raises:InvalidUrnError – If the string representation is in invalid format.

static get_data_type_from_urn(urn)

  • Parameters:urn (str)
  • Return type:str

property id : str

static make_data_type_urn(type)

  • Parameters:type (str)
  • Return type:str

static make_entity_type_urn(entity_type)

  • Parameters:entity_type (str)
  • Return type:str

static make_form_urn(form)

  • Parameters:form (str)
  • Return type:str

static make_structured_property_urn(structured_property)

  • Parameters:structured_property (str)
  • Return type:str

to_key_aspect()

urn()

Get the string representation of the urn.

  • Return type:str

urn_url_encoded()

  • Return type:str