mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-18 14:16:48 +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.MLFeature;
|
||||||
import com.linkedin.datahub.graphql.generated.MLFeatureTableProperties;
|
import com.linkedin.datahub.graphql.generated.MLFeatureTableProperties;
|
||||||
import com.linkedin.datahub.graphql.generated.MLPrimaryKey;
|
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 com.linkedin.datahub.graphql.types.mappers.ModelMapper;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
||||||
@ -41,6 +42,10 @@ public class MLFeatureTablePropertiesMapper implements ModelMapper<com.linkedin.
|
|||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mlFeatureTableProperties.hasCustomProperties()) {
|
||||||
|
result.setCustomProperties(StringMapMapper.map(mlFeatureTableProperties.getCustomProperties()));
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6945,6 +6945,8 @@ description: String
|
|||||||
mlFeatures: [MLFeature]
|
mlFeatures: [MLFeature]
|
||||||
|
|
||||||
mlPrimaryKeys: [MLPrimaryKey]
|
mlPrimaryKeys: [MLPrimaryKey]
|
||||||
|
|
||||||
|
customProperties: [StringMapEntry!]
|
||||||
}
|
}
|
||||||
|
|
||||||
type HyperParameterMap {
|
type HyperParameterMap {
|
||||||
|
@ -14,6 +14,7 @@ import { SidebarTagsSection } from '../shared/containers/profile/sidebar/Sidebar
|
|||||||
import MlFeatureTableFeatures from './profile/features/MlFeatureTableFeatures';
|
import MlFeatureTableFeatures from './profile/features/MlFeatureTableFeatures';
|
||||||
import Sources from './profile/Sources';
|
import Sources from './profile/Sources';
|
||||||
import { DocumentationTab } from '../shared/tabs/Documentation/DocumentationTab';
|
import { DocumentationTab } from '../shared/tabs/Documentation/DocumentationTab';
|
||||||
|
import { PropertiesTab } from '../shared/tabs/Properties/PropertiesTab';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Definition of the DataHub MLFeatureTable entity.
|
* Definition of the DataHub MLFeatureTable entity.
|
||||||
@ -75,6 +76,10 @@ export class MLFeatureTableEntity implements Entity<MlFeatureTable> {
|
|||||||
name: 'Sources',
|
name: 'Sources',
|
||||||
component: Sources,
|
component: Sources,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Properties',
|
||||||
|
component: PropertiesTab,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Documentation',
|
name: 'Documentation',
|
||||||
component: DocumentationTab,
|
component: DocumentationTab,
|
||||||
|
@ -498,6 +498,10 @@ fragment nonRecursiveMLFeatureTable on MLFeatureTable {
|
|||||||
mlPrimaryKeys {
|
mlPrimaryKeys {
|
||||||
...nonRecursiveMLPrimaryKey
|
...nonRecursiveMLPrimaryKey
|
||||||
}
|
}
|
||||||
|
customProperties {
|
||||||
|
key
|
||||||
|
value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ownership {
|
ownership {
|
||||||
...ownershipFields
|
...ownershipFields
|
||||||
|
@ -18,6 +18,14 @@ describe('features', () => {
|
|||||||
// feature & primary key sources are visible
|
// feature & primary key sources are visible
|
||||||
cy.contains('SampleCypressHdfsDataset');
|
cy.contains('SampleCypressHdfsDataset');
|
||||||
cy.contains('SampleCypressKafkaDataset');
|
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', () => {
|
it('can visit feature page', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user