mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-17 21:56:56 +00:00
feat(ml): show custom properties for MLFeatureTable in UI (#4706)
* feat(ml): show custom properties for MLFeatureTable in UI * Make assignment conditional * Fix lint
This commit is contained in:
parent
8d036fa179
commit
788fb8f45b
@ -3,6 +3,7 @@ package com.linkedin.datahub.graphql.types.mlmodel.mappers;
|
||||
import com.linkedin.datahub.graphql.generated.MLFeature;
|
||||
import com.linkedin.datahub.graphql.generated.MLFeatureTableProperties;
|
||||
import com.linkedin.datahub.graphql.generated.MLPrimaryKey;
|
||||
import com.linkedin.datahub.graphql.types.common.mappers.StringMapMapper;
|
||||
import com.linkedin.datahub.graphql.types.mappers.ModelMapper;
|
||||
import lombok.NonNull;
|
||||
|
||||
@ -41,6 +42,10 @@ public class MLFeatureTablePropertiesMapper implements ModelMapper<com.linkedin.
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
if (mlFeatureTableProperties.hasCustomProperties()) {
|
||||
result.setCustomProperties(StringMapMapper.map(mlFeatureTableProperties.getCustomProperties()));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -6945,6 +6945,8 @@ description: String
|
||||
mlFeatures: [MLFeature]
|
||||
|
||||
mlPrimaryKeys: [MLPrimaryKey]
|
||||
|
||||
customProperties: [StringMapEntry!]
|
||||
}
|
||||
|
||||
type HyperParameterMap {
|
||||
|
@ -14,6 +14,7 @@ import { SidebarTagsSection } from '../shared/containers/profile/sidebar/Sidebar
|
||||
import MlFeatureTableFeatures from './profile/features/MlFeatureTableFeatures';
|
||||
import Sources from './profile/Sources';
|
||||
import { DocumentationTab } from '../shared/tabs/Documentation/DocumentationTab';
|
||||
import { PropertiesTab } from '../shared/tabs/Properties/PropertiesTab';
|
||||
|
||||
/**
|
||||
* Definition of the DataHub MLFeatureTable entity.
|
||||
@ -75,6 +76,10 @@ export class MLFeatureTableEntity implements Entity<MlFeatureTable> {
|
||||
name: 'Sources',
|
||||
component: Sources,
|
||||
},
|
||||
{
|
||||
name: 'Properties',
|
||||
component: PropertiesTab,
|
||||
},
|
||||
{
|
||||
name: 'Documentation',
|
||||
component: DocumentationTab,
|
||||
|
@ -498,6 +498,10 @@ fragment nonRecursiveMLFeatureTable on MLFeatureTable {
|
||||
mlPrimaryKeys {
|
||||
...nonRecursiveMLPrimaryKey
|
||||
}
|
||||
customProperties {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
ownership {
|
||||
...ownershipFields
|
||||
|
@ -18,6 +18,14 @@ describe('features', () => {
|
||||
// feature & primary key sources are visible
|
||||
cy.contains('SampleCypressHdfsDataset');
|
||||
cy.contains('SampleCypressKafkaDataset');
|
||||
|
||||
// navigate to properties
|
||||
cy.contains('Properties').click();
|
||||
|
||||
// custom properties are visible
|
||||
cy.contains('status');
|
||||
cy.contains('Created');
|
||||
|
||||
});
|
||||
|
||||
it('can visit feature page', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user