breezy-portugal-43538
12/07/2022, 11:30 AMMLFeatureTablePropertiesClass and inside I am passing as a parameter a description and properties but I receive ValueError, does this proposal also need some other values? FYI the urn is already created and the data was uploaded, I only want to update something that already exists. Below is the function to do it:
def update_feature_table(self, urn, properties, urn_description=None):
properties = {k.capitalize().replace("_", " "): v for k, v in properties.items()}
# This below produces:
# ValueError: aspectName MLFeatureTableProperties does not match aspect type <class 'datahub.metadata.schema_classes.MLFeatureTablePropertiesClass'> with name mlFeatureTableProperties
# Create properties object for change proposal wrapper
feature_table_properties = MLFeatureTablePropertiesClass(
customProperties=properties,
description="Description not provided." if not urn_description else urn_description
)
# MCP creation
mcp = MetadataChangeProposalWrapper(
entityType="mlFeatureTable",
aspectName="MLFeatureTableProperties",
changeType=ChangeTypeClass.UPSERT,
entityUrn=urn,
aspect=feature_table_properties,
)
# Create an emitter to the GMS REST API.
emitter = DatahubRestEmitter(self.gms_endpoint)
# Emit metadata!
emitter.emit_mcp(mcp)breezy-portugal-43538
12/07/2022, 11:46 AM