URNs
ApplicationUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[ApplicationUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
ApplicationKeyClass
) – - Return type:
ApplicationUrn
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()
- Return type:
ApplicationKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
AssertionUrn
Bases: _SpecificUrn
- Parameters:
- assertion_id (
Union
[AssertionUrn
,str
]) – - _allow_coercion (
bool
) –
- assertion_id (
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)
- Parameters:key_aspect (
AssertionKeyClass
) – - Return type:
AssertionUrn
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()
- Return type:
AssertionKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
BusinessAttributeUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[BusinessAttributeUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
BusinessAttributeKeyClass
) – - Return type:
BusinessAttributeUrn
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()
- Return type:
BusinessAttributeKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
ChartUrn
Bases: _SpecificUrn
- Parameters:
- dashboard_tool (
str
) - chart_id (
str
) - _allow_coercion (
bool
) –
- dashboard_tool (
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
])
- platform (
- 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)
- Parameters:key_aspect (
ChartKeyClass
) – - Return type:
ChartUrn
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()
- Return type:
ChartKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
ContainerUrn
Bases: _SpecificUrn
- Parameters:
- guid (
Union
[ContainerUrn
,str
]) – - _allow_coercion (
bool
) –
- guid (
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)
- Parameters:key_aspect (
ContainerKeyClass
) – - Return type:
ContainerUrn
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()
- Return type:
ContainerKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
CorpGroupUrn
Bases: _SpecificUrn
- Parameters:
- name (
Union
[CorpGroupUrn
,str
]) – - _allow_coercion (
bool
) –
- name (
ENTITY_TYPE : ClassVar
[Literal
['corpGroup'
]] = 'corpGroup'
classmethod create_from_id(id)
Deprecated
Deprecated since version 0.12.0.2: Use the constructor instead
- Parameters:id (
str
) - Return type:
CorpGroupUrn
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)
- Parameters:key_aspect (
CorpGroupKeyClass
) – - Return type:
CorpGroupUrn
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()
- Return type:
CorpGroupKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
CorpUserUrn
Bases: _SpecificUrn
- Parameters:
- username (
Union
[CorpUserUrn
,str
]) – - _allow_coercion (
bool
) –
- username (
ENTITY_TYPE : ClassVar
[Literal
['corpuser'
]] = 'corpuser'
classmethod create_from_id(id)
Deprecated
Deprecated since version 0.12.0.2: Use the constructor instead
- Parameters:id (
str
) - Return type:
CorpUserUrn
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)
- Parameters:key_aspect (
CorpUserKeyClass
) – - Return type:
CorpUserUrn
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()
- Return type:
CorpUserKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
property username : str
DashboardUrn
Bases: _SpecificUrn
- Parameters:
- dashboard_tool (
str
) - dashboard_id (
str
) - _allow_coercion (
bool
) –
- dashboard_tool (
ENTITY_TYPE : ClassVar
[Literal
['dashboard'
]] = 'dashboard'
classmethod create_from_ids(platform, name, platform_instance=None)
- Parameters:
- platform (
str
) - name (
str
) - platform_instance (
Optional
[str
])
- platform (
- 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)
- Parameters:key_aspect (
DashboardKeyClass
) – - Return type:
DashboardUrn
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()
- Return type:
DashboardKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataContractUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataContractUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataContractKeyClass
) – - Return type:
DataContractUrn
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()
- Return type:
DataContractKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataFlowUrn
Bases: _SpecificUrn
- Parameters:
- orchestrator (
str
) - flow_id (
str
) - cluster (
str
) - _allow_coercion (
bool
) –
- orchestrator (
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
])
- orchestrator (
- 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)
- Parameters:key_aspect (
DataFlowKeyClass
) – - Return type:
DataFlowUrn
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()
- Return type:
DataFlowKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubAccessTokenUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubAccessTokenUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubAccessTokenKeyClass
) – - Return type:
DataHubAccessTokenUrn
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()
- Return type:
DataHubAccessTokenKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubActionUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubActionUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubActionKeyClass
) – - Return type:
DataHubActionUrn
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()
- Return type:
DataHubActionKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubConnectionUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubConnectionUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubConnectionKeyClass
) – - Return type:
DataHubConnectionUrn
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()
- Return type:
DataHubConnectionKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubExecutionRequestUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubExecutionRequestUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
ExecutionRequestKeyClass
) – - Return type:
DataHubExecutionRequestUrn
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()
- Return type:
ExecutionRequestKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubIngestionSourceUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubIngestionSourceUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubIngestionSourceKeyClass
) – - Return type:
DataHubIngestionSourceUrn
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()
- Return type:
DataHubIngestionSourceKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubOpenAPISchemaUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubOpenAPISchemaUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubOpenAPISchemaKeyClass
) – - Return type:
DataHubOpenAPISchemaUrn
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()
- Return type:
DataHubOpenAPISchemaKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubPersonaUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubPersonaUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubPersonaKeyClass
) – - Return type:
DataHubPersonaUrn
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()
- Return type:
DataHubPersonaKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubPolicyUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubPolicyUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubPolicyKeyClass
) – - Return type:
DataHubPolicyUrn
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()
- Return type:
DataHubPolicyKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubRetentionUrn
Bases: _SpecificUrn
- Parameters:
- entity_name (
str
) - aspect_name (
str
) - _allow_coercion (
bool
) –
- entity_name (
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)
- Parameters:key_aspect (
DataHubRetentionKeyClass
) – - Return type:
DataHubRetentionUrn
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()
- Return type:
DataHubRetentionKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubRoleUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubRoleUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubRoleKeyClass
) – - Return type:
DataHubRoleUrn
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()
- Return type:
DataHubRoleKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubSecretUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubSecretUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubSecretKeyClass
) – - Return type:
DataHubSecretUrn
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()
- Return type:
DataHubSecretKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubStepStateUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubStepStateUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubStepStateKeyClass
) – - Return type:
DataHubStepStateUrn
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()
- Return type:
DataHubStepStateKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubUpgradeUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubUpgradeUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubUpgradeKeyClass
) – - Return type:
DataHubUpgradeUrn
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()
- Return type:
DataHubUpgradeKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataHubViewUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataHubViewUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataHubViewKeyClass
) – - Return type:
DataHubViewUrn
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()
- Return type:
DataHubViewKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataJobUrn
Bases: _SpecificUrn
- Parameters:
- flow (
Union
[DataFlowUrn
,str
]) – - job_id (
str
) - _allow_coercion (
bool
) –
- flow (
ENTITY_TYPE : ClassVar
[Literal
['dataJob'
]] = 'dataJob'
classmethod create_from_ids(data_flow_urn, job_id)
- Parameters:
- data_flow_urn (
str
) - job_id (
str
)
- data_flow_urn (
- 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)
- Parameters:key_aspect (
DataJobKeyClass
) – - Return type:
DataJobUrn
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()
- Return type:
DataFlowUrn
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()
- Return type:
DataJobKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataPlatformInstanceUrn
Bases: _SpecificUrn
- Parameters:
- platform (
Union
[DataPlatformUrn
,str
]) – - instance (
str
) - _allow_coercion (
bool
) –
- platform (
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)
- Parameters:key_aspect (
DataPlatformInstanceKeyClass
) – - Return type:
DataPlatformInstanceUrn
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()
- Return type:
DataPlatformInstanceKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataPlatformUrn
Bases: _SpecificUrn
- Parameters:
- platform_name (
Union
[DataPlatformUrn
,str
]) – - _allow_coercion (
bool
) –
- platform_name (
ENTITY_TYPE : ClassVar
[Literal
['dataPlatform'
]] = 'dataPlatform'
classmethod create_from_id(id)
Deprecated
Deprecated since version 0.12.0.2: Use the constructor instead
- Parameters:id (
str
) - Return type:
DataPlatformUrn
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)
- Parameters:key_aspect (
DataPlatformKeyClass
) – - Return type:
DataPlatformUrn
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()
- Return type:
DataPlatformKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataProcessInstanceUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataProcessInstanceUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
ENTITY_TYPE : ClassVar
[Literal
['dataProcessInstance'
]] = 'dataProcessInstance'
classmethod create_from_id(id)
Deprecated
Deprecated since version 0.12.0.2: Use the constructor instead
- Parameters:id (
str
) - Return type:
DataProcessInstanceUrn
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)
- Parameters:key_aspect (
DataProcessInstanceKeyClass
) – - Return type:
DataProcessInstanceUrn
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()
- Return type:
DataProcessInstanceKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataProcessUrn
Bases: _SpecificUrn
- Parameters:
- name (
str
) - orchestrator (
str
) - env (
str
) - _allow_coercion (
bool
) –
- name (
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)
- Parameters:key_aspect (
DataProcessKeyClass
) – - Return type:
DataProcessUrn
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()
- Return type:
DataProcessKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataProductUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataProductUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataProductKeyClass
) – - Return type:
DataProductUrn
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()
- Return type:
DataProductKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DataTypeUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DataTypeUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
DataTypeKeyClass
) – - Return type:
DataTypeUrn
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()
- Return type:
DataTypeKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DatasetUrn
Bases: _SpecificUrn
- Parameters:
- platform (
Union
[DataPlatformUrn
,str
]) – - name (
str
) - env (
str
) - _allow_coercion (
bool
) –
- platform (
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
])
- platform_id (
- 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)
- Parameters:key_aspect (
DatasetKeyClass
) – - Return type:
DatasetUrn
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()
- Return type:
DataPlatformUrn
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()
- Return type:
DatasetKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
DomainUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[DomainUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
ENTITY_TYPE : ClassVar
[Literal
['domain'
]] = 'domain'
classmethod create_from_id(id)
Deprecated
Deprecated since version 0.12.0.2: Use the constructor instead
- Parameters:id (
str
) - Return type:
DomainUrn
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)
- Parameters:key_aspect (
DomainKeyClass
) – - Return type:
DomainUrn
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()
- Return type:
DomainKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
EntityTypeUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[EntityTypeUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
EntityTypeKeyClass
) – - Return type:
EntityTypeUrn
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()
- Return type:
EntityTypeKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
ErModelRelationshipUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[ErModelRelationshipUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
ERModelRelationshipKeyClass
) – - Return type:
ErModelRelationshipUrn
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()
- Return type:
ERModelRelationshipKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
FormUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[FormUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
FormKeyClass
) – - Return type:
FormUrn
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()
- Return type:
FormKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
GlobalSettingsUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[GlobalSettingsUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
GlobalSettingsKeyClass
) – - Return type:
GlobalSettingsUrn
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()
- Return type:
GlobalSettingsKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
GlossaryNodeUrn
Bases: _SpecificUrn
- Parameters:
- name (
Union
[GlossaryNodeUrn
,str
]) – - _allow_coercion (
bool
) –
- name (
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)
- Parameters:key_aspect (
GlossaryNodeKeyClass
) – - Return type:
GlossaryNodeUrn
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()
- Return type:
GlossaryNodeKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
GlossaryTermUrn
Bases: _SpecificUrn
- Parameters:
- name (
Union
[GlossaryTermUrn
,str
]) – - _allow_coercion (
bool
) –
- name (
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)
- Parameters:key_aspect (
GlossaryTermKeyClass
) – - Return type:
GlossaryTermUrn
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()
- Return type:
GlossaryTermKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
IncidentUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[IncidentUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
IncidentKeyClass
) – - Return type:
IncidentUrn
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()
- Return type:
IncidentKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
InviteTokenUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[InviteTokenUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
InviteTokenKeyClass
) – - Return type:
InviteTokenUrn
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()
- Return type:
InviteTokenKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
MlFeatureTableUrn
Bases: _SpecificUrn
- Parameters:
- platform (
Union
[DataPlatformUrn
,str
]) – - name (
str
) - _allow_coercion (
bool
) –
- platform (
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)
- Parameters:key_aspect (
MLFeatureTableKeyClass
) – - Return type:
MlFeatureTableUrn
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()
- Return type:
MLFeatureTableKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
MlFeatureUrn
Bases: _SpecificUrn
- Parameters:
- feature_namespace (
str
) - name (
str
) - _allow_coercion (
bool
) –
- feature_namespace (
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)
- Parameters:key_aspect (
MLFeatureKeyClass
) – - Return type:
MlFeatureUrn
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()
- Return type:
MLFeatureKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
MlModelDeploymentUrn
Bases: _SpecificUrn
- Parameters:
- platform (
Union
[DataPlatformUrn
,str
]) – - name (
str
) - env (
str
) - _allow_coercion (
bool
) –
- platform (
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)
- Parameters:key_aspect (
MLModelDeploymentKeyClass
) – - Return type:
MlModelDeploymentUrn
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()
- Return type:
MLModelDeploymentKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
MlModelGroupUrn
Bases: _SpecificUrn
- Parameters:
- platform (
Union
[DataPlatformUrn
,str
]) – - name (
str
) - env (
str
) - _allow_coercion (
bool
) –
- platform (
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)
- Parameters:key_aspect (
MLModelGroupKeyClass
) – - Return type:
MlModelGroupUrn
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()
- Return type:
MLModelGroupKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
MlModelUrn
Bases: _SpecificUrn
- Parameters:
- platform (
Union
[DataPlatformUrn
,str
]) – - name (
str
) - env (
str
) - _allow_coercion (
bool
) –
- platform (
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)
- Parameters:key_aspect (
MLModelKeyClass
) – - Return type:
MlModelUrn
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()
- Return type:
MLModelKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
MlPrimaryKeyUrn
Bases: _SpecificUrn
- Parameters:
- feature_namespace (
str
) - name (
str
) - _allow_coercion (
bool
) –
- feature_namespace (
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)
- Parameters:key_aspect (
MLPrimaryKeyKeyClass
) – - Return type:
MlPrimaryKeyUrn
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()
- Return type:
MLPrimaryKeyKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
NotebookUrn
Bases: _SpecificUrn
- Parameters:
- notebook_tool (
str
) - notebook_id (
str
) - _allow_coercion (
bool
) –
- notebook_tool (
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)
- Parameters:key_aspect (
NotebookKeyClass
) – - Return type:
NotebookUrn
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()
- Return type:
NotebookKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
OwnershipTypeUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[OwnershipTypeUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
OwnershipTypeKeyClass
) – - Return type:
OwnershipTypeUrn
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()
- Return type:
OwnershipTypeKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
PlatformResourceUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[PlatformResourceUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
PlatformResourceKeyClass
) – - Return type:
PlatformResourceUrn
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()
- Return type:
PlatformResourceKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
PostUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[PostUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
PostKeyClass
) – - Return type:
PostUrn
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()
- Return type:
PostKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
QueryUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[QueryUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
QueryKeyClass
) – - Return type:
QueryUrn
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()
- Return type:
QueryKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
RoleUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[RoleUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
RoleKeyClass
) – - Return type:
RoleUrn
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()
- Return type:
RoleKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
SchemaFieldUrn
Bases: _SpecificUrn
- Parameters:
- parent (
Union
[Urn
,str
]) – - field_path (
str
) - _allow_coercion (
bool
) –
- parent (
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)
- Parameters:key_aspect (
SchemaFieldKeyClass
) – - Return type:
SchemaFieldUrn
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()
- Return type:
SchemaFieldKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
StructuredPropertyUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[StructuredPropertyUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
StructuredPropertyKeyClass
) – - Return type:
StructuredPropertyUrn
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()
- Return type:
StructuredPropertyKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
TagUrn
Bases: _SpecificUrn
- Parameters:
- name (
Union
[TagUrn
,str
]) – - _allow_coercion (
bool
) –
- name (
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)
- Parameters:key_aspect (
TagKeyClass
) – - Return type:
TagUrn
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()
- Return type:
TagKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
TelemetryUrn
Bases: _SpecificUrn
- Parameters:
- name (
Union
[TelemetryUrn
,str
]) – - _allow_coercion (
bool
) –
- name (
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)
- Parameters:key_aspect (
TelemetryKeyClass
) – - Return type:
TelemetryUrn
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()
- Return type:
TelemetryKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
TestUrn
Bases: _SpecificUrn
- Parameters:
- id (
Union
[TestUrn
,str
]) – - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
TestKeyClass
) – - Return type:
TestUrn
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()
- Return type:
TestKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str
Urn
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
])
- entity_type (
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
Bases: _SpecificUrn
- Parameters:
- id (
str
) - entity_type (
str
) - _allow_coercion (
bool
) –
- id (
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)
- Parameters:key_aspect (
VersionSetKeyClass
) – - Return type:
VersionSetUrn
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()
- Return type:
VersionSetKeyClass
urn()
Get the string representation of the urn.
- Return type:
str
urn_url_encoded()
- Return type:
str