Tag

Properties

  • name Name of this Tag

  • target_type Target type of this tag, can be :
    DATA, ASSET, MODEL_VERSION, MODEL, DATASET_VERSION, DATASET, DEPLOYMENT, PREDICTED_ASSET


Methods

update

update(
   name: str
)

Description

Update this tag with a new name.

Examples

a_tag.update(name="new name")

Arguments

  • name (str) : New name of this tag.

delete

delete()

Description

Delete this tag from the platform.
All tagged object will not have this tag anymore.

:warning: DANGER ZONE: Be very careful here!

Examples

tag.delete()

attach_on

attach_on(
   targets: Union[Dao, List[Dao], MultiObject[Dao]]
)

Description

Attach this tag on a list of target.

Tag needs to be the same target type as the taggable object.
For example, if it's a Data Tag, it can only be attached on Data.

If this is not a good target type, it will not raise any Error, but it will not do anything.

Examples

data_tag = datalake.create_data_tag("home")
some_data = datalake.list_data()
data_tag.attach_on(some_data)

Arguments

  • targets (Union[Dao, List[Dao], MultiObject[Dao]]) : List of target to attach this tag on.

detach_from

detach_from(
   targets: Union[Dao, List[Dao], MultiObject[Dao]]
)

Description

Detach this tag from a list of target.

Tag needs to be the same target type as the taggable object.
For example, if it's a Data Tag, it can only be detached from a Data.

If this is not a good target type, it will not raise any Error, but it will not do anything.

Examples

data_tag = datalake.create_data_tag("home")
some_data = datalake.list_data()
data_tag.attach_on(some_data)

data_tag.detach_from(some_data)

Arguments

  • targets (Union[Dao, List[Dao], MultiObject[Dao]]) : List of target to detach this tag from.