Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ingest): add browse paths + dataplatform for Feast features #2849

Merged
merged 5 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3435,7 +3435,7 @@
"Aspect" : {
"name" : "mlFeatureTableProperties"
}
}, "com.linkedin.common.Ownership", "com.linkedin.common.InstitutionalMemory", "com.linkedin.common.Status", "com.linkedin.common.Deprecation" ]
}, "com.linkedin.common.Ownership", "com.linkedin.common.InstitutionalMemory", "com.linkedin.common.Status", "com.linkedin.common.Deprecation", "com.linkedin.common.BrowsePaths" ]
}
},
"doc" : "The list of metadata aspects associated with the MLFeatureTable. Depending on the use case, this can either be all, or a selection, of supported aspects."
Expand Down
5 changes: 4 additions & 1 deletion metadata-ingestion/src/datahub/ingestion/source/feast.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
)
from datahub.metadata.com.linkedin.pegasus2avro.mxe import MetadataChangeEvent
from datahub.metadata.schema_classes import (
BrowsePathsClass,
MLFeaturePropertiesClass,
MLFeatureTablePropertiesClass,
MLPrimaryKeyPropertiesClass,
Expand Down Expand Up @@ -221,7 +222,9 @@ def get_feature_table_wu(self, ingest_table):

featuretable_snapshot = MLFeatureTableSnapshot(
urn=builder.make_ml_feature_table_urn("feast", ingest_table["name"]),
aspects=[],
aspects=[
BrowsePathsClass(paths=[f"feast/{ingest_table['name']}"]),
],
)

featuretable_snapshot.aspects.append(
Expand Down
3 changes: 2 additions & 1 deletion metadata-ingestion/src/datahub/metadata/schema.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -4264,7 +4264,8 @@
"com.linkedin.pegasus2avro.common.Ownership",
"com.linkedin.pegasus2avro.common.InstitutionalMemory",
"com.linkedin.pegasus2avro.common.Status",
"com.linkedin.pegasus2avro.common.Deprecation"
"com.linkedin.pegasus2avro.common.Deprecation",
"com.linkedin.pegasus2avro.common.BrowsePaths"
]
},
"name": "aspects",
Expand Down
6 changes: 3 additions & 3 deletions metadata-ingestion/src/datahub/metadata/schema_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4797,7 +4797,7 @@ class MLFeatureTableSnapshotClass(DictWrapper):
RECORD_SCHEMA = get_schema_type("com.linkedin.pegasus2avro.metadata.snapshot.MLFeatureTableSnapshot")
def __init__(self,
urn: str,
aspects: List[Union["MLFeatureTableKeyClass", "MLFeatureTablePropertiesClass", "OwnershipClass", "InstitutionalMemoryClass", "StatusClass", "DeprecationClass"]],
aspects: List[Union["MLFeatureTableKeyClass", "MLFeatureTablePropertiesClass", "OwnershipClass", "InstitutionalMemoryClass", "StatusClass", "DeprecationClass", "BrowsePathsClass"]],
):
super().__init__()

Expand Down Expand Up @@ -4829,13 +4829,13 @@ def urn(self, value: str) -> None:


@property
def aspects(self) -> List[Union["MLFeatureTableKeyClass", "MLFeatureTablePropertiesClass", "OwnershipClass", "InstitutionalMemoryClass", "StatusClass", "DeprecationClass"]]:
def aspects(self) -> List[Union["MLFeatureTableKeyClass", "MLFeatureTablePropertiesClass", "OwnershipClass", "InstitutionalMemoryClass", "StatusClass", "DeprecationClass", "BrowsePathsClass"]]:
"""Getter: The list of metadata aspects associated with the MLFeatureTable. Depending on the use case, this can either be all, or a selection, of supported aspects."""
return self._inner_dict.get('aspects') # type: ignore


@aspects.setter
def aspects(self, value: List[Union["MLFeatureTableKeyClass", "MLFeatureTablePropertiesClass", "OwnershipClass", "InstitutionalMemoryClass", "StatusClass", "DeprecationClass"]]) -> None:
def aspects(self, value: List[Union["MLFeatureTableKeyClass", "MLFeatureTablePropertiesClass", "OwnershipClass", "InstitutionalMemoryClass", "StatusClass", "DeprecationClass", "BrowsePathsClass"]]) -> None:
"""Setter: The list of metadata aspects associated with the MLFeatureTable. Depending on the use case, this can either be all, or a selection, of supported aspects."""
self._inner_dict['aspects'] = value

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4209,7 +4209,8 @@
"com.linkedin.pegasus2avro.common.Ownership",
"com.linkedin.pegasus2avro.common.InstitutionalMemory",
"com.linkedin.pegasus2avro.common.Status",
"com.linkedin.pegasus2avro.common.Deprecation"
"com.linkedin.pegasus2avro.common.Deprecation",
"com.linkedin.pegasus2avro.common.BrowsePaths"
]
},
"doc": "The list of metadata aspects associated with the MLFeatureTable. Depending on the use case, this can either be all, or a selection, of supported aspects."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4208,7 +4208,8 @@
"com.linkedin.pegasus2avro.common.Ownership",
"com.linkedin.pegasus2avro.common.InstitutionalMemory",
"com.linkedin.pegasus2avro.common.Status",
"com.linkedin.pegasus2avro.common.Deprecation"
"com.linkedin.pegasus2avro.common.Deprecation",
"com.linkedin.pegasus2avro.common.BrowsePaths"
]
},
"doc": "The list of metadata aspects associated with the MLFeatureTable. Depending on the use case, this can either be all, or a selection, of supported aspects."
Expand Down
21 changes: 21 additions & 0 deletions metadata-ingestion/tests/integration/feast/feast_mces_golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,13 @@
"com.linkedin.pegasus2avro.metadata.snapshot.MLFeatureTableSnapshot": {
"urn": "urn:li:mlFeatureTable:(urn:li:dataPlatform:feast,test_feature_table_all_feature_dtypes)",
"aspects": [
{
"com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [
"feast/test_feature_table_all_feature_dtypes"
]
}
},
{
"com.linkedin.pegasus2avro.ml.metadata.MLFeatureTableProperties": {
"customProperties": {},
Expand Down Expand Up @@ -420,6 +427,13 @@
"com.linkedin.pegasus2avro.metadata.snapshot.MLFeatureTableSnapshot": {
"urn": "urn:li:mlFeatureTable:(urn:li:dataPlatform:feast,test_feature_table_no_labels)",
"aspects": [
{
"com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [
"feast/test_feature_table_no_labels"
]
}
},
{
"com.linkedin.pegasus2avro.ml.metadata.MLFeatureTableProperties": {
"customProperties": {},
Expand Down Expand Up @@ -485,6 +499,13 @@
"com.linkedin.pegasus2avro.metadata.snapshot.MLFeatureTableSnapshot": {
"urn": "urn:li:mlFeatureTable:(urn:li:dataPlatform:feast,test_feature_table_single_feature)",
"aspects": [
{
"com.linkedin.pegasus2avro.common.BrowsePaths": {
"paths": [
"feast/test_feature_table_single_feature"
]
}
},
{
"com.linkedin.pegasus2avro.ml.metadata.MLFeatureTableProperties": {
"customProperties": {},
Expand Down
Loading