mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-01 11:19:05 +00:00
OS Fixes: Hand tailor types, merge dataset-entity, removed unused types
{COMMIT-SYNC:8532a92fef64760adebfc54fa2ad4c3acf361b41}
This commit is contained in:
parent
f043d414a4
commit
96af9c7ed6
@ -14,7 +14,7 @@ import { readUpstreamDatasets } from '@datahub/data-models/api/dataset/lineage';
|
||||
import { DatasetLineageList } from '@datahub/metadata-types/types/entity/dataset/lineage';
|
||||
import { getRenderProps } from '@datahub/data-models/entity/dataset/render-props';
|
||||
import { NotImplementedError } from '@datahub/data-models/constants/entity/shared';
|
||||
import { every } from 'lodash';
|
||||
import { every } from 'lodash-es';
|
||||
import DatasetComplianceSuggestion from '@datahub/data-models/entity/dataset/modules/compliance-suggestion';
|
||||
import { SuggestionIntent } from '@datahub/data-models/constants/entity/dataset/compliance-suggestions';
|
||||
import { FabricType } from '@datahub/metadata-types/constants/common/fabric-type';
|
||||
|
||||
@ -1,29 +1,5 @@
|
||||
import { MetadataAspect } from '@datahub/metadata-types/types/metadata/aspect';
|
||||
|
||||
type AspectsOfSnapshot<Snapshot> = Snapshot extends { aspects: Array<infer Aspect> } ? Aspect : {};
|
||||
|
||||
/**
|
||||
* An enumeration of MetadataAspect['metadata'] property keys
|
||||
* Defined as a record instead of an enum to bind the values to updates at the source-of-truth's (MetadataAspect['metadata'])
|
||||
* type definitions are reflected here
|
||||
* @type Record<string, keyof MetadataAspect['metadata']>
|
||||
*/
|
||||
export const SnapshotMetadataAspectKey: Record<string, keyof MetadataAspect> = {
|
||||
UmpDatasetProperties: 'com.linkedin.dataset.ump.UMPDatasetProperties',
|
||||
RetentionPolicy: 'com.linkedin.dataset.RetentionPolicy',
|
||||
ComplianceInfo: 'com.linkedin.dataset.ComplianceInfo',
|
||||
Ownership: 'com.linkedin.common.Ownership'
|
||||
};
|
||||
|
||||
/**
|
||||
* Aliases the values in the constant enum SnapshotMetadataAspectKeyName, this is a union of strings that can be used to index the
|
||||
* metadata object on an instance of MetadataAspect
|
||||
* This creates a type of values found in the record above SnapshotMetadataAspectKey
|
||||
* essentially Object.values(SnapshotMetadataAspectKey) as a type
|
||||
* @type {string}
|
||||
*/
|
||||
export type SnapshotMetadataAspectKeyName = typeof SnapshotMetadataAspectKey[string];
|
||||
|
||||
/**
|
||||
* Takes a lookup key on the aspects metadata object, and returns an iteratee function that is truthy when it's argument
|
||||
* has a metadata object that matches the lookup key
|
||||
|
||||
88354
datahub-web/@datahub/metadata-types/types/codegen/index.d.ts
vendored
88354
datahub-web/@datahub/metadata-types/types/codegen/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@ -1,17 +0,0 @@
|
||||
import { IBaseAspect } from '@datahub/metadata-types/types/metadata/aspect';
|
||||
|
||||
/**
|
||||
* A specific metadata aspect for a dataset
|
||||
* @export
|
||||
* @namespace metadata.aspect
|
||||
* @interface IDatasetAspect
|
||||
*/
|
||||
export interface IDatasetAspect extends IBaseAspect {
|
||||
// URN for the dataset the metadata aspect is associated with
|
||||
urn: string;
|
||||
// The specific metadata aspect
|
||||
'com.linkedin.dataset.ump.UMPDatasetProperties'?: Com.Linkedin.Dataset.Ump.UMPDatasetProperties;
|
||||
'com.linkedin.dataset.RetentionPolicy'?: Com.Linkedin.Dataset.RetentionPolicy;
|
||||
'com.linkedin.dataset.ComplianceInfo'?: Com.Linkedin.Dataset.ComplianceInfo;
|
||||
'com.linkedin.common.Ownership'?: Com.Linkedin.Common.Ownership;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user