Hello, I have a quick question for MlFeatureTable...
# troubleshoot
b
Hello, I have a quick question for MlFeatureTables, in order to update custom_properties within a featureTable I am creating the
MLFeatureTablePropertiesClass
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:
Copy code
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)
okay, never mind, commenting out the aspectName from MetadataChangeProposalWrapper helped : )