mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-19 05:52:20 +00:00
Updated ts from json schema (#1270)
This commit is contained in:
parent
c078200f7c
commit
8f1fb1b8db
@ -38,7 +38,7 @@ export interface CreateLocation {
|
||||
*/
|
||||
service: EntityReference;
|
||||
/**
|
||||
* Tags for this chart
|
||||
* Tags for this location
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ export interface MlFeature {
|
||||
*/
|
||||
featureAlgorithm?: string;
|
||||
/**
|
||||
* Columns used to create the ML Feature
|
||||
* Columns used to create the ML Feature.
|
||||
*/
|
||||
featureSources?: FeatureSource[];
|
||||
fullyQualifiedName?: string;
|
||||
@ -232,11 +232,11 @@ export interface MlHyperParameter {
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Hyper parameter name
|
||||
* Hyper parameter name.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Hyper parameter value
|
||||
* Hyper parameter value.
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
@ -0,0 +1,257 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Schema corresponding to a model that belongs to a database
|
||||
*/
|
||||
export interface CreateModel {
|
||||
/**
|
||||
* Schema of the Model
|
||||
*/
|
||||
columns: Column[];
|
||||
/**
|
||||
* Database corresponding to this table
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* Description of entity instance.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Name that identifies the this entity instance uniquely. Same as id if when name is not
|
||||
* unique
|
||||
*/
|
||||
name: string;
|
||||
nodeType?: NodeType;
|
||||
/**
|
||||
* Owner of this entity
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Tags for this model
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* View Definition in SQL.
|
||||
*/
|
||||
viewDefinition?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type for a column in a table.
|
||||
*/
|
||||
export interface Column {
|
||||
/**
|
||||
* Data type used array in dataType. For example, `array<int>` has dataType as `array` and
|
||||
* arrayDataType as `int`.
|
||||
*/
|
||||
arrayDataType?: DataType;
|
||||
/**
|
||||
* Child columns if dataType or arrayDataType is `map`, `struct`, or `union` else `null`.
|
||||
*/
|
||||
children?: Column[];
|
||||
/**
|
||||
* Column level constraint.
|
||||
*/
|
||||
constraint?: Constraint;
|
||||
/**
|
||||
* Length of `char`, `varchar`, `binary`, `varbinary` `dataTypes`, else null. For example,
|
||||
* `varchar(20)` has dataType as `varchar` and dataLength as `20`.
|
||||
*/
|
||||
dataLength?: number;
|
||||
/**
|
||||
* Data type of the column (int, date etc.).
|
||||
*/
|
||||
dataType: DataType;
|
||||
/**
|
||||
* Display name used for dataType. This is useful for complex types, such as `array<int>,
|
||||
* map<int,string>, struct<>, and union types.
|
||||
*/
|
||||
dataTypeDisplay?: string;
|
||||
/**
|
||||
* Description of the column.
|
||||
*/
|
||||
description?: string;
|
||||
fullyQualifiedName?: string;
|
||||
/**
|
||||
* Json schema only if the dataType is JSON else null.
|
||||
*/
|
||||
jsonSchema?: string;
|
||||
name: string;
|
||||
/**
|
||||
* Ordinal position of the column.
|
||||
*/
|
||||
ordinalPosition?: number;
|
||||
/**
|
||||
* Tags associated with the column.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Data type used array in dataType. For example, `array<int>` has dataType as `array` and
|
||||
* arrayDataType as `int`.
|
||||
*
|
||||
* This enum defines the type of data stored in a column.
|
||||
*
|
||||
* Data type of the column (int, date etc.).
|
||||
*/
|
||||
export enum DataType {
|
||||
Array = 'ARRAY',
|
||||
Bigint = 'BIGINT',
|
||||
Binary = 'BINARY',
|
||||
Blob = 'BLOB',
|
||||
Boolean = 'BOOLEAN',
|
||||
Byteint = 'BYTEINT',
|
||||
Char = 'CHAR',
|
||||
Date = 'DATE',
|
||||
Datetime = 'DATETIME',
|
||||
Decimal = 'DECIMAL',
|
||||
Double = 'DOUBLE',
|
||||
Enum = 'ENUM',
|
||||
Float = 'FLOAT',
|
||||
Geography = 'GEOGRAPHY',
|
||||
Int = 'INT',
|
||||
Interval = 'INTERVAL',
|
||||
JSON = 'JSON',
|
||||
Longblob = 'LONGBLOB',
|
||||
Map = 'MAP',
|
||||
Mediumblob = 'MEDIUMBLOB',
|
||||
Mediumtext = 'MEDIUMTEXT',
|
||||
Number = 'NUMBER',
|
||||
Numeric = 'NUMERIC',
|
||||
Set = 'SET',
|
||||
Smallint = 'SMALLINT',
|
||||
String = 'STRING',
|
||||
Struct = 'STRUCT',
|
||||
Text = 'TEXT',
|
||||
Time = 'TIME',
|
||||
Timestamp = 'TIMESTAMP',
|
||||
Tinyint = 'TINYINT',
|
||||
Union = 'UNION',
|
||||
Varbinary = 'VARBINARY',
|
||||
Varchar = 'VARCHAR',
|
||||
}
|
||||
|
||||
/**
|
||||
* Column level constraint.
|
||||
*
|
||||
* This enum defines the type for column constraint.
|
||||
*/
|
||||
export enum Constraint {
|
||||
NotNull = 'NOT_NULL',
|
||||
Null = 'NULL',
|
||||
PrimaryKey = 'PRIMARY_KEY',
|
||||
Unique = 'UNIQUE',
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type for labeling an entity with a Tag.
|
||||
*/
|
||||
export interface TagLabel {
|
||||
/**
|
||||
* Unique name of the tag category.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Link to the tag resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
labelType: LabelType;
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
state: State;
|
||||
tagFQN: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
export enum LabelType {
|
||||
Automated = 'Automated',
|
||||
Derived = 'Derived',
|
||||
Manual = 'Manual',
|
||||
Propagated = 'Propagated',
|
||||
}
|
||||
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
export enum State {
|
||||
Confirmed = 'Confirmed',
|
||||
Suggested = 'Suggested',
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type used for describing different types of Nodes.
|
||||
*/
|
||||
export enum NodeType {
|
||||
Model = 'Model',
|
||||
Seed = 'Seed',
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this entity
|
||||
*
|
||||
* This schema defines the EntityReference type used for referencing an entity.
|
||||
* EntityReference is used for capturing relationships from one entity to another. For
|
||||
* example, a table has an attribute called database of type EntityReference that captures
|
||||
* the relationship of a table `belongs to a` database.
|
||||
*/
|
||||
export interface EntityReference {
|
||||
/**
|
||||
* Optional description of entity.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this entity.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the entity resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name of the entity instance. For entities such as tables, databases where the name is not
|
||||
* unique, fullyQualifiedName is returned in this field.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Entity type/class name - Examples: `database`, `table`, `metrics`, `redshift`, `mysql`,
|
||||
* `bigquery`, `snowflake`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
@ -69,6 +69,7 @@ export enum DatabaseServiceType {
|
||||
BigQuery = 'BigQuery',
|
||||
Glue = 'Glue',
|
||||
Hive = 'Hive',
|
||||
MariaDB = 'MariaDB',
|
||||
Mssql = 'MSSQL',
|
||||
MySQL = 'MySQL',
|
||||
Oracle = 'Oracle',
|
||||
|
@ -35,6 +35,7 @@ export interface CreateStorageService {
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
export enum StorageServiceType {
|
||||
Abfs = 'ABFS',
|
||||
Gcs = 'GCS',
|
||||
Hdfs = 'HDFS',
|
||||
S3 = 'S3',
|
||||
|
@ -77,12 +77,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -111,12 +111,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -111,12 +111,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -101,12 +101,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* This schema defines the Location entity. A Location can contain the data of a table or
|
||||
* group other sublocation together
|
||||
* group other sublocation together.
|
||||
*/
|
||||
export interface Location {
|
||||
/**
|
||||
@ -39,7 +39,7 @@ export interface Location {
|
||||
*/
|
||||
followers?: EntityReference[];
|
||||
/**
|
||||
* Fully qualified name of a location in the form `serviceName:/name`.
|
||||
* Fully qualified name of a location in the form `serviceName.locationName`.
|
||||
*/
|
||||
fullyQualifiedName?: string;
|
||||
/**
|
||||
@ -52,7 +52,7 @@ export interface Location {
|
||||
id?: string;
|
||||
locationType?: LocationType;
|
||||
/**
|
||||
* Name of a location without the service. s3://bucket/path1/path2 -> /bucket/path1/path2
|
||||
* Name of a location without the service. For example s3://bucket/path1/path2.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
@ -99,12 +99,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -99,12 +99,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -113,12 +113,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
@ -191,7 +194,7 @@ export interface MlFeature {
|
||||
*/
|
||||
featureAlgorithm?: string;
|
||||
/**
|
||||
* Columns used to create the ML Feature
|
||||
* Columns used to create the ML Feature.
|
||||
*/
|
||||
featureSources?: FeatureSource[];
|
||||
fullyQualifiedName?: string;
|
||||
@ -308,11 +311,11 @@ export interface MlHyperParameter {
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Hyper parameter name
|
||||
* Hyper parameter name.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Hyper parameter value
|
||||
* Hyper parameter value.
|
||||
*/
|
||||
value?: string;
|
||||
}
|
||||
|
@ -0,0 +1,411 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This schema defines the Model entity. A Model organizes data modeling details , sql and
|
||||
* columns
|
||||
*/
|
||||
export interface Model {
|
||||
catalogType?: CatalogType;
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
/**
|
||||
* Columns in this table.
|
||||
*/
|
||||
columns: Column[];
|
||||
/**
|
||||
* Reference to Database that contains this table.
|
||||
*/
|
||||
database?: EntityReference;
|
||||
/**
|
||||
* Description of a model.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this model. It could be title or label from the source
|
||||
* services.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Followers of this table.
|
||||
*/
|
||||
followers?: EntityReference[];
|
||||
/**
|
||||
* Fully qualified name of a model in the form `serviceName.databaseName.modelName`.
|
||||
*/
|
||||
fullyQualifiedName?: string;
|
||||
/**
|
||||
* Link to this table resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier of this model instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Reference to the Location that contains this table.
|
||||
*/
|
||||
location?: EntityReference;
|
||||
materializationType?: MaterializationType;
|
||||
/**
|
||||
* Name of a model. Expected to be unique within a database.
|
||||
*/
|
||||
name: string;
|
||||
nodeType?: NodeType;
|
||||
/**
|
||||
* Owner of this table.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Tags for this table.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity.
|
||||
*/
|
||||
updatedAt?: Date;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Latest usage information for this table.
|
||||
*/
|
||||
usageSummary?: TypeUsedToReturnUsageDetailsOfAnEntity;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* View Definition in SQL. Applies to TableType.View only.
|
||||
*/
|
||||
viewDefinition?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type used for describing different catalog type.
|
||||
*/
|
||||
export enum CatalogType {
|
||||
BaseTable = 'BaseTable',
|
||||
}
|
||||
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*
|
||||
* Description of the change.
|
||||
*/
|
||||
export interface ChangeDescription {
|
||||
/**
|
||||
* Names of fields added during the version changes.
|
||||
*/
|
||||
fieldsAdded?: FieldChange[];
|
||||
/**
|
||||
* Fields deleted during the version changes with old value before deleted.
|
||||
*/
|
||||
fieldsDeleted?: FieldChange[];
|
||||
/**
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* New value of the field. Note that this is a JSON string and use the corresponding field
|
||||
* type to deserialize it.
|
||||
*/
|
||||
newValue?: any;
|
||||
/**
|
||||
* Previous value of the field. Note that this is a JSON string and use the corresponding
|
||||
* field type to deserialize it.
|
||||
*/
|
||||
oldValue?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type for a column in a table.
|
||||
*/
|
||||
export interface Column {
|
||||
/**
|
||||
* Data type used array in dataType. For example, `array<int>` has dataType as `array` and
|
||||
* arrayDataType as `int`.
|
||||
*/
|
||||
arrayDataType?: DataType;
|
||||
/**
|
||||
* Child columns if dataType or arrayDataType is `map`, `struct`, or `union` else `null`.
|
||||
*/
|
||||
children?: Column[];
|
||||
/**
|
||||
* Column level constraint.
|
||||
*/
|
||||
constraint?: Constraint;
|
||||
/**
|
||||
* Length of `char`, `varchar`, `binary`, `varbinary` `dataTypes`, else null. For example,
|
||||
* `varchar(20)` has dataType as `varchar` and dataLength as `20`.
|
||||
*/
|
||||
dataLength?: number;
|
||||
/**
|
||||
* Data type of the column (int, date etc.).
|
||||
*/
|
||||
dataType: DataType;
|
||||
/**
|
||||
* Display name used for dataType. This is useful for complex types, such as `array<int>,
|
||||
* map<int,string>, struct<>, and union types.
|
||||
*/
|
||||
dataTypeDisplay?: string;
|
||||
/**
|
||||
* Description of the column.
|
||||
*/
|
||||
description?: string;
|
||||
fullyQualifiedName?: string;
|
||||
/**
|
||||
* Json schema only if the dataType is JSON else null.
|
||||
*/
|
||||
jsonSchema?: string;
|
||||
name: string;
|
||||
/**
|
||||
* Ordinal position of the column.
|
||||
*/
|
||||
ordinalPosition?: number;
|
||||
/**
|
||||
* Tags associated with the column.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Data type used array in dataType. For example, `array<int>` has dataType as `array` and
|
||||
* arrayDataType as `int`.
|
||||
*
|
||||
* This enum defines the type of data stored in a column.
|
||||
*
|
||||
* Data type of the column (int, date etc.).
|
||||
*/
|
||||
export enum DataType {
|
||||
Array = 'ARRAY',
|
||||
Bigint = 'BIGINT',
|
||||
Binary = 'BINARY',
|
||||
Blob = 'BLOB',
|
||||
Boolean = 'BOOLEAN',
|
||||
Byteint = 'BYTEINT',
|
||||
Char = 'CHAR',
|
||||
Date = 'DATE',
|
||||
Datetime = 'DATETIME',
|
||||
Decimal = 'DECIMAL',
|
||||
Double = 'DOUBLE',
|
||||
Enum = 'ENUM',
|
||||
Float = 'FLOAT',
|
||||
Geography = 'GEOGRAPHY',
|
||||
Int = 'INT',
|
||||
Interval = 'INTERVAL',
|
||||
JSON = 'JSON',
|
||||
Longblob = 'LONGBLOB',
|
||||
Map = 'MAP',
|
||||
Mediumblob = 'MEDIUMBLOB',
|
||||
Mediumtext = 'MEDIUMTEXT',
|
||||
Number = 'NUMBER',
|
||||
Numeric = 'NUMERIC',
|
||||
Set = 'SET',
|
||||
Smallint = 'SMALLINT',
|
||||
String = 'STRING',
|
||||
Struct = 'STRUCT',
|
||||
Text = 'TEXT',
|
||||
Time = 'TIME',
|
||||
Timestamp = 'TIMESTAMP',
|
||||
Tinyint = 'TINYINT',
|
||||
Union = 'UNION',
|
||||
Varbinary = 'VARBINARY',
|
||||
Varchar = 'VARCHAR',
|
||||
}
|
||||
|
||||
/**
|
||||
* Column level constraint.
|
||||
*
|
||||
* This enum defines the type for column constraint.
|
||||
*/
|
||||
export enum Constraint {
|
||||
NotNull = 'NOT_NULL',
|
||||
Null = 'NULL',
|
||||
PrimaryKey = 'PRIMARY_KEY',
|
||||
Unique = 'UNIQUE',
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type for labeling an entity with a Tag.
|
||||
*/
|
||||
export interface TagLabel {
|
||||
/**
|
||||
* Unique name of the tag category.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Link to the tag resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
labelType: LabelType;
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
state: State;
|
||||
tagFQN: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
export enum LabelType {
|
||||
Automated = 'Automated',
|
||||
Derived = 'Derived',
|
||||
Manual = 'Manual',
|
||||
Propagated = 'Propagated',
|
||||
}
|
||||
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
export enum State {
|
||||
Confirmed = 'Confirmed',
|
||||
Suggested = 'Suggested',
|
||||
}
|
||||
|
||||
/**
|
||||
* Reference to Database that contains this table.
|
||||
*
|
||||
* This schema defines the EntityReference type used for referencing an entity.
|
||||
* EntityReference is used for capturing relationships from one entity to another. For
|
||||
* example, a table has an attribute called database of type EntityReference that captures
|
||||
* the relationship of a table `belongs to a` database.
|
||||
*
|
||||
* Followers of this table.
|
||||
*
|
||||
* Reference to the Location that contains this table.
|
||||
*
|
||||
* Owner of this table.
|
||||
*/
|
||||
export interface EntityReference {
|
||||
/**
|
||||
* Optional description of entity.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this entity.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the entity resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name of the entity instance. For entities such as tables, databases where the name is not
|
||||
* unique, fullyQualifiedName is returned in this field.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Entity type/class name - Examples: `database`, `table`, `metrics`, `redshift`, `mysql`,
|
||||
* `bigquery`, `snowflake`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type used for describing different materialization type.
|
||||
*/
|
||||
export enum MaterializationType {
|
||||
Seed = 'Seed',
|
||||
Table = 'Table',
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type used for describing different types of Nodes.
|
||||
*/
|
||||
export enum NodeType {
|
||||
Model = 'Model',
|
||||
Seed = 'Seed',
|
||||
}
|
||||
|
||||
/**
|
||||
* Latest usage information for this table.
|
||||
*
|
||||
* This schema defines the type for usage details. Daily, weekly, and monthly aggregation of
|
||||
* usage is computed along with the percentile rank based on the usage for a given day.
|
||||
*/
|
||||
export interface TypeUsedToReturnUsageDetailsOfAnEntity {
|
||||
/**
|
||||
* Daily usage stats of a data asset on the start date.
|
||||
*/
|
||||
dailyStats: UsageStats;
|
||||
/**
|
||||
* Date in UTC.
|
||||
*/
|
||||
date: Date;
|
||||
/**
|
||||
* Monthly (last 30 days) rolling usage stats of a data asset on the start date.
|
||||
*/
|
||||
monthlyStats?: UsageStats;
|
||||
/**
|
||||
* Weekly (last 7 days) rolling usage stats of a data asset on the start date.
|
||||
*/
|
||||
weeklyStats?: UsageStats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Daily usage stats of a data asset on the start date.
|
||||
*
|
||||
* Type used to return usage statistics.
|
||||
*
|
||||
* Monthly (last 30 days) rolling usage stats of a data asset on the start date.
|
||||
*
|
||||
* Weekly (last 7 days) rolling usage stats of a data asset on the start date.
|
||||
*/
|
||||
export interface UsageStats {
|
||||
/**
|
||||
* Usage count of a data asset on the start date.
|
||||
*/
|
||||
count: number;
|
||||
/**
|
||||
* Optional daily percentile rank data asset use when relevant.
|
||||
*/
|
||||
percentileRank?: number;
|
||||
}
|
@ -119,12 +119,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -94,12 +94,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -136,12 +136,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -137,12 +137,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -0,0 +1,295 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Describes an entity Access Control Rule used within a Policy
|
||||
*/
|
||||
export interface Rule {
|
||||
/**
|
||||
* A set of access control enforcements to take on the entities.
|
||||
*/
|
||||
actions: TagBased[];
|
||||
filters: Array<TagLabel | string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes an Access Control Rule to selectively grant access to Teams/Users to tagged
|
||||
* entities.
|
||||
*/
|
||||
export interface TagBased {
|
||||
/**
|
||||
* Teams and Users who are able to access the tagged entities.
|
||||
*/
|
||||
allow: Team[];
|
||||
/**
|
||||
* Tags that are associated with the entities.
|
||||
*/
|
||||
tags: TagLabel[];
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the Team entity. A Team is a group of zero or more users. Teams can
|
||||
* own zero or more data assets.
|
||||
*
|
||||
* This schema defines the User entity. A user can be part of 0 or more teams. A special
|
||||
* type of user called Bot is used for automation. A user can be an owner of zero or more
|
||||
* data assets. A user can also follow zero or more data assets.
|
||||
*/
|
||||
export interface Team {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
/**
|
||||
* When true the team has been deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* Description of the team.
|
||||
*
|
||||
* Used for user biography.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Name used for display purposes. Example 'Data Science team'.
|
||||
*
|
||||
* Name used for display purposes. Example 'FirstName LastName'.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the resource corresponding to this entity.
|
||||
*/
|
||||
href: string;
|
||||
/**
|
||||
* Unique identifier that identifies a user entity instance.
|
||||
*/
|
||||
id: string;
|
||||
name: string;
|
||||
/**
|
||||
* List of entities owned by the team.
|
||||
*
|
||||
* List of entities owned by the user.
|
||||
*/
|
||||
owns?: EntityReference[];
|
||||
/**
|
||||
* Team profile information.
|
||||
*
|
||||
* Profile of the user.
|
||||
*/
|
||||
profile?: Profile;
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity.
|
||||
*/
|
||||
updatedAt?: Date;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Users that are part of the team.
|
||||
*/
|
||||
users?: EntityReference[];
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* When true indicates the user has been deactivated. Users are deactivated instead of
|
||||
* deleted.
|
||||
*/
|
||||
deactivated?: boolean;
|
||||
/**
|
||||
* Email address of the user.
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* List of entities followed by the user.
|
||||
*/
|
||||
follows?: EntityReference[];
|
||||
/**
|
||||
* When true indicates user is an administrator for the system with superuser privileges.
|
||||
*/
|
||||
isAdmin?: boolean;
|
||||
/**
|
||||
* When true indicates a special type of user called Bot.
|
||||
*/
|
||||
isBot?: boolean;
|
||||
/**
|
||||
* Teams that the user belongs to.
|
||||
*/
|
||||
teams?: EntityReference[];
|
||||
/**
|
||||
* Timezone of the user.
|
||||
*/
|
||||
timezone?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*
|
||||
* Description of the change.
|
||||
*/
|
||||
export interface ChangeDescription {
|
||||
/**
|
||||
* Names of fields added during the version changes.
|
||||
*/
|
||||
fieldsAdded?: FieldChange[];
|
||||
/**
|
||||
* Fields deleted during the version changes with old value before deleted.
|
||||
*/
|
||||
fieldsDeleted?: FieldChange[];
|
||||
/**
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* New value of the field. Note that this is a JSON string and use the corresponding field
|
||||
* type to deserialize it.
|
||||
*/
|
||||
newValue?: any;
|
||||
/**
|
||||
* Previous value of the field. Note that this is a JSON string and use the corresponding
|
||||
* field type to deserialize it.
|
||||
*/
|
||||
oldValue?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* List of entities owned by the team.
|
||||
*
|
||||
* This schema defines the EntityReference type used for referencing an entity.
|
||||
* EntityReference is used for capturing relationships from one entity to another. For
|
||||
* example, a table has an attribute called database of type EntityReference that captures
|
||||
* the relationship of a table `belongs to a` database.
|
||||
*/
|
||||
export interface EntityReference {
|
||||
/**
|
||||
* Optional description of entity.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this entity.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the entity resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name of the entity instance. For entities such as tables, databases where the name is not
|
||||
* unique, fullyQualifiedName is returned in this field.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Entity type/class name - Examples: `database`, `table`, `metrics`, `redshift`, `mysql`,
|
||||
* `bigquery`, `snowflake`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Team profile information.
|
||||
*
|
||||
* This schema defines the type for a profile of a user, team, or organization.
|
||||
*
|
||||
* Profile of the user.
|
||||
*/
|
||||
export interface Profile {
|
||||
images?: ImageList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Links to a list of images of varying resolutions/sizes.
|
||||
*/
|
||||
export interface ImageList {
|
||||
image?: string;
|
||||
image192?: string;
|
||||
image24?: string;
|
||||
image32?: string;
|
||||
image48?: string;
|
||||
image512?: string;
|
||||
image72?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type for labeling an entity with a Tag.
|
||||
*
|
||||
* Entity tags to match on.
|
||||
*/
|
||||
export interface TagLabel {
|
||||
/**
|
||||
* Unique name of the tag category.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Link to the tag resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
labelType: LabelType;
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
state: State;
|
||||
tagFQN: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
export enum LabelType {
|
||||
Automated = 'Automated',
|
||||
Derived = 'Derived',
|
||||
Manual = 'Manual',
|
||||
Propagated = 'Propagated',
|
||||
}
|
||||
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
export enum State {
|
||||
Confirmed = 'Confirmed',
|
||||
Suggested = 'Suggested',
|
||||
}
|
@ -0,0 +1,282 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Describes an Access Control Rule to selectively grant access to Teams/Users to tagged
|
||||
* entities.
|
||||
*/
|
||||
export interface TagBased {
|
||||
/**
|
||||
* Teams and Users who are able to access the tagged entities.
|
||||
*/
|
||||
allow: Team[];
|
||||
/**
|
||||
* Tags that are associated with the entities.
|
||||
*/
|
||||
tags: TagLabel[];
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the Team entity. A Team is a group of zero or more users. Teams can
|
||||
* own zero or more data assets.
|
||||
*
|
||||
* This schema defines the User entity. A user can be part of 0 or more teams. A special
|
||||
* type of user called Bot is used for automation. A user can be an owner of zero or more
|
||||
* data assets. A user can also follow zero or more data assets.
|
||||
*/
|
||||
export interface Team {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
/**
|
||||
* When true the team has been deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* Description of the team.
|
||||
*
|
||||
* Used for user biography.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Name used for display purposes. Example 'Data Science team'.
|
||||
*
|
||||
* Name used for display purposes. Example 'FirstName LastName'.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the resource corresponding to this entity.
|
||||
*/
|
||||
href: string;
|
||||
/**
|
||||
* Unique identifier that identifies a user entity instance.
|
||||
*/
|
||||
id: string;
|
||||
name: string;
|
||||
/**
|
||||
* List of entities owned by the team.
|
||||
*
|
||||
* List of entities owned by the user.
|
||||
*/
|
||||
owns?: EntityReference[];
|
||||
/**
|
||||
* Team profile information.
|
||||
*
|
||||
* Profile of the user.
|
||||
*/
|
||||
profile?: Profile;
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity.
|
||||
*/
|
||||
updatedAt?: Date;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Users that are part of the team.
|
||||
*/
|
||||
users?: EntityReference[];
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* When true indicates the user has been deactivated. Users are deactivated instead of
|
||||
* deleted.
|
||||
*/
|
||||
deactivated?: boolean;
|
||||
/**
|
||||
* Email address of the user.
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* List of entities followed by the user.
|
||||
*/
|
||||
follows?: EntityReference[];
|
||||
/**
|
||||
* When true indicates user is an administrator for the system with superuser privileges.
|
||||
*/
|
||||
isAdmin?: boolean;
|
||||
/**
|
||||
* When true indicates a special type of user called Bot.
|
||||
*/
|
||||
isBot?: boolean;
|
||||
/**
|
||||
* Teams that the user belongs to.
|
||||
*/
|
||||
teams?: EntityReference[];
|
||||
/**
|
||||
* Timezone of the user.
|
||||
*/
|
||||
timezone?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*
|
||||
* Description of the change.
|
||||
*/
|
||||
export interface ChangeDescription {
|
||||
/**
|
||||
* Names of fields added during the version changes.
|
||||
*/
|
||||
fieldsAdded?: FieldChange[];
|
||||
/**
|
||||
* Fields deleted during the version changes with old value before deleted.
|
||||
*/
|
||||
fieldsDeleted?: FieldChange[];
|
||||
/**
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* New value of the field. Note that this is a JSON string and use the corresponding field
|
||||
* type to deserialize it.
|
||||
*/
|
||||
newValue?: any;
|
||||
/**
|
||||
* Previous value of the field. Note that this is a JSON string and use the corresponding
|
||||
* field type to deserialize it.
|
||||
*/
|
||||
oldValue?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* List of entities owned by the team.
|
||||
*
|
||||
* This schema defines the EntityReference type used for referencing an entity.
|
||||
* EntityReference is used for capturing relationships from one entity to another. For
|
||||
* example, a table has an attribute called database of type EntityReference that captures
|
||||
* the relationship of a table `belongs to a` database.
|
||||
*/
|
||||
export interface EntityReference {
|
||||
/**
|
||||
* Optional description of entity.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this entity.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the entity resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name of the entity instance. For entities such as tables, databases where the name is not
|
||||
* unique, fullyQualifiedName is returned in this field.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Entity type/class name - Examples: `database`, `table`, `metrics`, `redshift`, `mysql`,
|
||||
* `bigquery`, `snowflake`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Team profile information.
|
||||
*
|
||||
* This schema defines the type for a profile of a user, team, or organization.
|
||||
*
|
||||
* Profile of the user.
|
||||
*/
|
||||
export interface Profile {
|
||||
images?: ImageList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Links to a list of images of varying resolutions/sizes.
|
||||
*/
|
||||
export interface ImageList {
|
||||
image?: string;
|
||||
image192?: string;
|
||||
image24?: string;
|
||||
image32?: string;
|
||||
image48?: string;
|
||||
image512?: string;
|
||||
image72?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type for labeling an entity with a Tag.
|
||||
*/
|
||||
export interface TagLabel {
|
||||
/**
|
||||
* Unique name of the tag category.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Link to the tag resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
labelType: LabelType;
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
state: State;
|
||||
tagFQN: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
export enum LabelType {
|
||||
Automated = 'Automated',
|
||||
Derived = 'Derived',
|
||||
Manual = 'Manual',
|
||||
Propagated = 'Propagated',
|
||||
}
|
||||
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
export enum State {
|
||||
Confirmed = 'Confirmed',
|
||||
Suggested = 'Suggested',
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* An action to delete or expire the entity.
|
||||
*/
|
||||
export interface DeleteAction {
|
||||
/**
|
||||
* Number of days after creation of the entity that the deletion should be triggered.
|
||||
*/
|
||||
daysAfterCreation?: number;
|
||||
/**
|
||||
* Number of days after last modification of the entity that the deletion should be
|
||||
* triggered.
|
||||
*/
|
||||
daysAfterModification?: number;
|
||||
}
|
@ -0,0 +1,374 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* An action to move the entity to a different location. For eg: Move from Standard storage
|
||||
* tier to Archive storage tier.
|
||||
*/
|
||||
export interface MoveAction {
|
||||
/**
|
||||
* Number of days after creation of the entity that the move should be triggered.
|
||||
*/
|
||||
daysAfterCreation?: number;
|
||||
/**
|
||||
* Number of days after last modification of the entity that the move should be triggered.
|
||||
*/
|
||||
daysAfterModification?: number;
|
||||
/**
|
||||
* Location where this entity needs to be moved to.
|
||||
*/
|
||||
destination: Destination;
|
||||
}
|
||||
|
||||
/**
|
||||
* Location where this entity needs to be moved to.
|
||||
*/
|
||||
export interface Destination {
|
||||
/**
|
||||
* The location where to move this entity to.
|
||||
*/
|
||||
location?: Table;
|
||||
/**
|
||||
* The storage class to move this entity to.
|
||||
*/
|
||||
storageClassType?: StorageClassType;
|
||||
/**
|
||||
* The storage service to move this entity to.
|
||||
*/
|
||||
storageServiceType?: StorageService;
|
||||
}
|
||||
|
||||
/**
|
||||
* The location where to move this entity to.
|
||||
*
|
||||
* This schema defines the Location entity. A Location can contain the data of a table or
|
||||
* group other sublocation together.
|
||||
*/
|
||||
export interface Table {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
/**
|
||||
* Description of a location.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this table. It could be title or label from the source
|
||||
* services.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Followers of this location.
|
||||
*/
|
||||
followers?: EntityReference[];
|
||||
/**
|
||||
* Fully qualified name of a location in the form `serviceName.locationName`.
|
||||
*/
|
||||
fullyQualifiedName?: string;
|
||||
/**
|
||||
* Link to this location resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier of this location instance.
|
||||
*/
|
||||
id?: string;
|
||||
locationType?: LocationType;
|
||||
/**
|
||||
* Name of a location without the service. For example s3://bucket/path1/path2.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this location.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Link to the database cluster/service where this database is hosted in.
|
||||
*/
|
||||
service: EntityReference;
|
||||
/**
|
||||
* Tags for this location.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity.
|
||||
*/
|
||||
updatedAt?: Date;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*
|
||||
* Description of the change.
|
||||
*/
|
||||
export interface ChangeDescription {
|
||||
/**
|
||||
* Names of fields added during the version changes.
|
||||
*/
|
||||
fieldsAdded?: FieldChange[];
|
||||
/**
|
||||
* Fields deleted during the version changes with old value before deleted.
|
||||
*/
|
||||
fieldsDeleted?: FieldChange[];
|
||||
/**
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* New value of the field. Note that this is a JSON string and use the corresponding field
|
||||
* type to deserialize it.
|
||||
*/
|
||||
newValue?: any;
|
||||
/**
|
||||
* Previous value of the field. Note that this is a JSON string and use the corresponding
|
||||
* field type to deserialize it.
|
||||
*/
|
||||
oldValue?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Followers of this location.
|
||||
*
|
||||
* This schema defines the EntityReference type used for referencing an entity.
|
||||
* EntityReference is used for capturing relationships from one entity to another. For
|
||||
* example, a table has an attribute called database of type EntityReference that captures
|
||||
* the relationship of a table `belongs to a` database.
|
||||
*
|
||||
* Owner of this location.
|
||||
*
|
||||
* Link to the database cluster/service where this database is hosted in.
|
||||
*/
|
||||
export interface EntityReference {
|
||||
/**
|
||||
* Optional description of entity.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this entity.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the entity resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name of the entity instance. For entities such as tables, databases where the name is not
|
||||
* unique, fullyQualifiedName is returned in this field.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Entity type/class name - Examples: `database`, `table`, `metrics`, `redshift`, `mysql`,
|
||||
* `bigquery`, `snowflake`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type used for describing different types of Location.
|
||||
*/
|
||||
export enum LocationType {
|
||||
Bucket = 'Bucket',
|
||||
Database = 'Database',
|
||||
Prefix = 'Prefix',
|
||||
Table = 'Table',
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type for labeling an entity with a Tag.
|
||||
*/
|
||||
export interface TagLabel {
|
||||
/**
|
||||
* Unique name of the tag category.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Link to the tag resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
labelType: LabelType;
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
state: State;
|
||||
tagFQN: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
export enum LabelType {
|
||||
Automated = 'Automated',
|
||||
Derived = 'Derived',
|
||||
Manual = 'Manual',
|
||||
Propagated = 'Propagated',
|
||||
}
|
||||
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
export enum State {
|
||||
Confirmed = 'Confirmed',
|
||||
Suggested = 'Suggested',
|
||||
}
|
||||
|
||||
/**
|
||||
* The storage class to move this entity to.
|
||||
*
|
||||
* Type of storage class for the storage service
|
||||
*
|
||||
* Name of the entity field that changed.
|
||||
*
|
||||
* Name of the field of an entity.
|
||||
*
|
||||
* Link to the entity resource.
|
||||
*
|
||||
* URI that points to a resource.
|
||||
*
|
||||
* Link to this location resource.
|
||||
*
|
||||
* Link to the tag resource.
|
||||
*
|
||||
* Link to the resource corresponding to this storage service.
|
||||
*
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*
|
||||
* Unique id used to identify an entity.
|
||||
*
|
||||
* Unique identifier of this location instance.
|
||||
*
|
||||
* Unique identifier of this storage service instance.
|
||||
*
|
||||
* Type of storage class offered by S3
|
||||
*
|
||||
* Type of storage class offered by GCS
|
||||
*
|
||||
* Type of storage class offered by ABFS
|
||||
*/
|
||||
export enum StorageClassType {
|
||||
Archive = 'ARCHIVE',
|
||||
Coldline = 'COLDLINE',
|
||||
Cool = 'COOL',
|
||||
DeepArchive = 'DEEP_ARCHIVE',
|
||||
DurableReducedAvailability = 'DURABLE_REDUCED_AVAILABILITY',
|
||||
Glacier = 'GLACIER',
|
||||
Hot = 'HOT',
|
||||
IntelligentTiering = 'INTELLIGENT_TIERING',
|
||||
MultiRegional = 'MULTI_REGIONAL',
|
||||
Nearline = 'NEARLINE',
|
||||
OnezoneIa = 'ONEZONE_IA',
|
||||
Outposts = 'OUTPOSTS',
|
||||
ReducedRedundancy = 'REDUCED_REDUNDANCY',
|
||||
Regional = 'REGIONAL',
|
||||
Standard = 'STANDARD',
|
||||
StandardIa = 'STANDARD_IA',
|
||||
}
|
||||
|
||||
/**
|
||||
* The storage service to move this entity to.
|
||||
*
|
||||
* This schema defines the Storage Service entity, such as S3, GCS, HDFS.
|
||||
*/
|
||||
export interface StorageService {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
/**
|
||||
* Description of a storage service instance.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this storage service.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the resource corresponding to this storage service.
|
||||
*/
|
||||
href: string;
|
||||
/**
|
||||
* Unique identifier of this storage service instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name that identifies this storage service.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
serviceType: StorageServiceType;
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity.
|
||||
*/
|
||||
updatedAt?: Date;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
export enum StorageServiceType {
|
||||
Abfs = 'ABFS',
|
||||
Gcs = 'GCS',
|
||||
Hdfs = 'HDFS',
|
||||
S3 = 'S3',
|
||||
}
|
@ -0,0 +1,424 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Describes an entity Lifecycle Rule used within a Policy
|
||||
*/
|
||||
export interface Rule {
|
||||
/**
|
||||
* A set of actions to take on the entities.
|
||||
*/
|
||||
actions: LifecycleEAction[];
|
||||
filters: Array<TagLabel | string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* An action to delete or expire the entity.
|
||||
*
|
||||
* An action to move the entity to a different location. For eg: Move from Standard storage
|
||||
* tier to Archive storage tier.
|
||||
*/
|
||||
export interface LifecycleEAction {
|
||||
/**
|
||||
* Number of days after creation of the entity that the deletion should be triggered.
|
||||
*
|
||||
* Number of days after creation of the entity that the move should be triggered.
|
||||
*/
|
||||
daysAfterCreation?: number;
|
||||
/**
|
||||
* Number of days after last modification of the entity that the deletion should be
|
||||
* triggered.
|
||||
*
|
||||
* Number of days after last modification of the entity that the move should be triggered.
|
||||
*/
|
||||
daysAfterModification?: number;
|
||||
/**
|
||||
* Location where this entity needs to be moved to.
|
||||
*/
|
||||
destination?: Destination;
|
||||
}
|
||||
|
||||
/**
|
||||
* Location where this entity needs to be moved to.
|
||||
*/
|
||||
export interface Destination {
|
||||
/**
|
||||
* The location where to move this entity to.
|
||||
*/
|
||||
location?: Table;
|
||||
/**
|
||||
* The storage class to move this entity to.
|
||||
*/
|
||||
storageClassType?: StorageClassType;
|
||||
/**
|
||||
* The storage service to move this entity to.
|
||||
*/
|
||||
storageServiceType?: StorageService;
|
||||
}
|
||||
|
||||
/**
|
||||
* The location where to move this entity to.
|
||||
*
|
||||
* This schema defines the Location entity. A Location can contain the data of a table or
|
||||
* group other sublocation together.
|
||||
*/
|
||||
export interface Table {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
/**
|
||||
* Description of a location.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this table. It could be title or label from the source
|
||||
* services.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Followers of this location.
|
||||
*/
|
||||
followers?: EntityReference[];
|
||||
/**
|
||||
* Fully qualified name of a location in the form `serviceName.locationName`.
|
||||
*/
|
||||
fullyQualifiedName?: string;
|
||||
/**
|
||||
* Link to this location resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier of this location instance.
|
||||
*/
|
||||
id?: string;
|
||||
locationType?: LocationType;
|
||||
/**
|
||||
* Name of a location without the service. For example s3://bucket/path1/path2.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this location.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Link to the database cluster/service where this database is hosted in.
|
||||
*/
|
||||
service: EntityReference;
|
||||
/**
|
||||
* Tags for this location.
|
||||
*/
|
||||
tags?: TagElement[];
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity.
|
||||
*/
|
||||
updatedAt?: Date;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*
|
||||
* Description of the change.
|
||||
*/
|
||||
export interface ChangeDescription {
|
||||
/**
|
||||
* Names of fields added during the version changes.
|
||||
*/
|
||||
fieldsAdded?: FieldChange[];
|
||||
/**
|
||||
* Fields deleted during the version changes with old value before deleted.
|
||||
*/
|
||||
fieldsDeleted?: FieldChange[];
|
||||
/**
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* New value of the field. Note that this is a JSON string and use the corresponding field
|
||||
* type to deserialize it.
|
||||
*/
|
||||
newValue?: any;
|
||||
/**
|
||||
* Previous value of the field. Note that this is a JSON string and use the corresponding
|
||||
* field type to deserialize it.
|
||||
*/
|
||||
oldValue?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Followers of this location.
|
||||
*
|
||||
* This schema defines the EntityReference type used for referencing an entity.
|
||||
* EntityReference is used for capturing relationships from one entity to another. For
|
||||
* example, a table has an attribute called database of type EntityReference that captures
|
||||
* the relationship of a table `belongs to a` database.
|
||||
*
|
||||
* Owner of this location.
|
||||
*
|
||||
* Link to the database cluster/service where this database is hosted in.
|
||||
*/
|
||||
export interface EntityReference {
|
||||
/**
|
||||
* Optional description of entity.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this entity.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the entity resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name of the entity instance. For entities such as tables, databases where the name is not
|
||||
* unique, fullyQualifiedName is returned in this field.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Entity type/class name - Examples: `database`, `table`, `metrics`, `redshift`, `mysql`,
|
||||
* `bigquery`, `snowflake`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type used for describing different types of Location.
|
||||
*/
|
||||
export enum LocationType {
|
||||
Bucket = 'Bucket',
|
||||
Database = 'Database',
|
||||
Prefix = 'Prefix',
|
||||
Table = 'Table',
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type for labeling an entity with a Tag.
|
||||
*/
|
||||
export interface TagElement {
|
||||
/**
|
||||
* Unique name of the tag category.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Link to the tag resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
labelType: LabelType;
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
state: State;
|
||||
tagFQN: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
export enum LabelType {
|
||||
Automated = 'Automated',
|
||||
Derived = 'Derived',
|
||||
Manual = 'Manual',
|
||||
Propagated = 'Propagated',
|
||||
}
|
||||
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
export enum State {
|
||||
Confirmed = 'Confirmed',
|
||||
Suggested = 'Suggested',
|
||||
}
|
||||
|
||||
/**
|
||||
* The storage class to move this entity to.
|
||||
*
|
||||
* Type of storage class for the storage service
|
||||
*
|
||||
* Name of the entity field that changed.
|
||||
*
|
||||
* Name of the field of an entity.
|
||||
*
|
||||
* Link to the entity resource.
|
||||
*
|
||||
* URI that points to a resource.
|
||||
*
|
||||
* Link to this location resource.
|
||||
*
|
||||
* Link to the tag resource.
|
||||
*
|
||||
* Link to the resource corresponding to this storage service.
|
||||
*
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*
|
||||
* Unique id used to identify an entity.
|
||||
*
|
||||
* Unique identifier of this location instance.
|
||||
*
|
||||
* Unique identifier of this storage service instance.
|
||||
*
|
||||
* Regex that matches the entity FQN.
|
||||
*
|
||||
* Type of storage class offered by S3
|
||||
*
|
||||
* Type of storage class offered by GCS
|
||||
*
|
||||
* Type of storage class offered by ABFS
|
||||
*/
|
||||
export enum StorageClassType {
|
||||
Archive = 'ARCHIVE',
|
||||
Coldline = 'COLDLINE',
|
||||
Cool = 'COOL',
|
||||
DeepArchive = 'DEEP_ARCHIVE',
|
||||
DurableReducedAvailability = 'DURABLE_REDUCED_AVAILABILITY',
|
||||
Glacier = 'GLACIER',
|
||||
Hot = 'HOT',
|
||||
IntelligentTiering = 'INTELLIGENT_TIERING',
|
||||
MultiRegional = 'MULTI_REGIONAL',
|
||||
Nearline = 'NEARLINE',
|
||||
OnezoneIa = 'ONEZONE_IA',
|
||||
Outposts = 'OUTPOSTS',
|
||||
ReducedRedundancy = 'REDUCED_REDUNDANCY',
|
||||
Regional = 'REGIONAL',
|
||||
Standard = 'STANDARD',
|
||||
StandardIa = 'STANDARD_IA',
|
||||
}
|
||||
|
||||
/**
|
||||
* The storage service to move this entity to.
|
||||
*
|
||||
* This schema defines the Storage Service entity, such as S3, GCS, HDFS.
|
||||
*/
|
||||
export interface StorageService {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
/**
|
||||
* Description of a storage service instance.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this storage service.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the resource corresponding to this storage service.
|
||||
*/
|
||||
href: string;
|
||||
/**
|
||||
* Unique identifier of this storage service instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name that identifies this storage service.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
serviceType: StorageServiceType;
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity.
|
||||
*/
|
||||
updatedAt?: Date;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
export enum StorageServiceType {
|
||||
Abfs = 'ABFS',
|
||||
Gcs = 'GCS',
|
||||
Hdfs = 'HDFS',
|
||||
S3 = 'S3',
|
||||
}
|
||||
|
||||
/**
|
||||
* Entity tags to match on.
|
||||
*
|
||||
* This schema defines the type for labeling an entity with a Tag.
|
||||
*/
|
||||
export interface TagLabel {
|
||||
/**
|
||||
* Unique name of the tag category.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Link to the tag resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
labelType: LabelType;
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
state: State;
|
||||
tagFQN: string;
|
||||
}
|
@ -22,9 +22,9 @@
|
||||
*/
|
||||
export interface Policy {
|
||||
/**
|
||||
* Change that led to this version of the entity.
|
||||
* Change that led to this version of the Policy.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
changeDescription?: PolicyChangeDescription;
|
||||
/**
|
||||
* A short description of the Policy, comprehensible to regular users.
|
||||
*/
|
||||
@ -56,12 +56,16 @@ export interface Policy {
|
||||
/**
|
||||
* Owner of this Policy.
|
||||
*/
|
||||
owner: EntityReference;
|
||||
owner: PolicyOwner;
|
||||
policyType: PolicyType;
|
||||
/**
|
||||
* Link to a well documented definition of this Policy.
|
||||
*/
|
||||
policyUrl?: string;
|
||||
/**
|
||||
* A set of rules associated with this Policy.
|
||||
*/
|
||||
rules?: Rule[];
|
||||
/**
|
||||
* Last update time corresponding to the new version of the Policy.
|
||||
*/
|
||||
@ -77,29 +81,32 @@ export interface Policy {
|
||||
}
|
||||
|
||||
/**
|
||||
* Change that led to this version of the entity.
|
||||
* Change that led to this version of the Policy.
|
||||
*
|
||||
* Description of the change.
|
||||
*/
|
||||
export interface ChangeDescription {
|
||||
export interface PolicyChangeDescription {
|
||||
/**
|
||||
* Names of fields added during the version changes.
|
||||
*/
|
||||
fieldsAdded?: FieldChange[];
|
||||
fieldsAdded?: PurpleFieldChange[];
|
||||
/**
|
||||
* Fields deleted during the version changes with old value before deleted.
|
||||
*/
|
||||
fieldsDeleted?: FieldChange[];
|
||||
fieldsDeleted?: PurpleFieldChange[];
|
||||
/**
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
fieldsUpdated?: PurpleFieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
export interface PurpleFieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
@ -122,7 +129,7 @@ export interface FieldChange {
|
||||
* example, a table has an attribute called database of type EntityReference that captures
|
||||
* the relationship of a table `belongs to a` database.
|
||||
*/
|
||||
export interface EntityReference {
|
||||
export interface PolicyOwner {
|
||||
/**
|
||||
* Optional description of entity.
|
||||
*/
|
||||
@ -158,3 +165,552 @@ export enum PolicyType {
|
||||
AccessControl = 'AccessControl',
|
||||
Lifecycle = 'Lifecycle',
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes an entity Access Control Rule used within a Policy
|
||||
*
|
||||
* Describes an entity Lifecycle Rule used within a Policy
|
||||
*/
|
||||
export interface Rule {
|
||||
/**
|
||||
* A set of access control enforcements to take on the entities.
|
||||
*
|
||||
* A set of actions to take on the entities.
|
||||
*/
|
||||
actions: TagBased[];
|
||||
filters: Array<TagLabel | string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes an Access Control Rule to selectively grant access to Teams/Users to tagged
|
||||
* entities.
|
||||
*
|
||||
* An action to delete or expire the entity.
|
||||
*
|
||||
* An action to move the entity to a different location. For eg: Move from Standard storage
|
||||
* tier to Archive storage tier.
|
||||
*/
|
||||
export interface TagBased {
|
||||
/**
|
||||
* Teams and Users who are able to access the tagged entities.
|
||||
*/
|
||||
allow?: Team[];
|
||||
/**
|
||||
* Tags that are associated with the entities.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* Number of days after creation of the entity that the deletion should be triggered.
|
||||
*
|
||||
* Number of days after creation of the entity that the move should be triggered.
|
||||
*/
|
||||
daysAfterCreation?: number;
|
||||
/**
|
||||
* Number of days after last modification of the entity that the deletion should be
|
||||
* triggered.
|
||||
*
|
||||
* Number of days after last modification of the entity that the move should be triggered.
|
||||
*/
|
||||
daysAfterModification?: number;
|
||||
/**
|
||||
* Location where this entity needs to be moved to.
|
||||
*/
|
||||
destination?: Destination;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the Team entity. A Team is a group of zero or more users. Teams can
|
||||
* own zero or more data assets.
|
||||
*
|
||||
* This schema defines the User entity. A user can be part of 0 or more teams. A special
|
||||
* type of user called Bot is used for automation. A user can be an owner of zero or more
|
||||
* data assets. A user can also follow zero or more data assets.
|
||||
*/
|
||||
export interface Team {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: AllowChangeDescription;
|
||||
/**
|
||||
* When true the team has been deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* Description of the team.
|
||||
*
|
||||
* Used for user biography.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Name used for display purposes. Example 'Data Science team'.
|
||||
*
|
||||
* Name used for display purposes. Example 'FirstName LastName'.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the resource corresponding to this entity.
|
||||
*/
|
||||
href: string;
|
||||
/**
|
||||
* Unique identifier that identifies a user entity instance.
|
||||
*/
|
||||
id: string;
|
||||
name: string;
|
||||
/**
|
||||
* List of entities owned by the team.
|
||||
*
|
||||
* List of entities owned by the user.
|
||||
*/
|
||||
owns?: OwnerElement[];
|
||||
/**
|
||||
* Team profile information.
|
||||
*
|
||||
* Profile of the user.
|
||||
*/
|
||||
profile?: Profile;
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity.
|
||||
*/
|
||||
updatedAt?: Date;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Users that are part of the team.
|
||||
*/
|
||||
users?: OwnerElement[];
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* When true indicates the user has been deactivated. Users are deactivated instead of
|
||||
* deleted.
|
||||
*/
|
||||
deactivated?: boolean;
|
||||
/**
|
||||
* Email address of the user.
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* List of entities followed by the user.
|
||||
*/
|
||||
follows?: OwnerElement[];
|
||||
/**
|
||||
* When true indicates user is an administrator for the system with superuser privileges.
|
||||
*/
|
||||
isAdmin?: boolean;
|
||||
/**
|
||||
* When true indicates a special type of user called Bot.
|
||||
*/
|
||||
isBot?: boolean;
|
||||
/**
|
||||
* Teams that the user belongs to.
|
||||
*/
|
||||
teams?: OwnerElement[];
|
||||
/**
|
||||
* Timezone of the user.
|
||||
*/
|
||||
timezone?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*
|
||||
* Description of the change.
|
||||
*/
|
||||
export interface AllowChangeDescription {
|
||||
/**
|
||||
* Names of fields added during the version changes.
|
||||
*/
|
||||
fieldsAdded?: FluffyFieldChange[];
|
||||
/**
|
||||
* Fields deleted during the version changes with old value before deleted.
|
||||
*/
|
||||
fieldsDeleted?: FluffyFieldChange[];
|
||||
/**
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FluffyFieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FluffyFieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* New value of the field. Note that this is a JSON string and use the corresponding field
|
||||
* type to deserialize it.
|
||||
*/
|
||||
newValue?: any;
|
||||
/**
|
||||
* Previous value of the field. Note that this is a JSON string and use the corresponding
|
||||
* field type to deserialize it.
|
||||
*/
|
||||
oldValue?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* List of entities owned by the team.
|
||||
*
|
||||
* This schema defines the EntityReference type used for referencing an entity.
|
||||
* EntityReference is used for capturing relationships from one entity to another. For
|
||||
* example, a table has an attribute called database of type EntityReference that captures
|
||||
* the relationship of a table `belongs to a` database.
|
||||
*
|
||||
* Owner of this location.
|
||||
*
|
||||
* Link to the database cluster/service where this database is hosted in.
|
||||
*/
|
||||
export interface OwnerElement {
|
||||
/**
|
||||
* Optional description of entity.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this entity.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the entity resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name of the entity instance. For entities such as tables, databases where the name is not
|
||||
* unique, fullyQualifiedName is returned in this field.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Entity type/class name - Examples: `database`, `table`, `metrics`, `redshift`, `mysql`,
|
||||
* `bigquery`, `snowflake`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Team profile information.
|
||||
*
|
||||
* This schema defines the type for a profile of a user, team, or organization.
|
||||
*
|
||||
* Profile of the user.
|
||||
*/
|
||||
export interface Profile {
|
||||
images?: ImageList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Links to a list of images of varying resolutions/sizes.
|
||||
*/
|
||||
export interface ImageList {
|
||||
image?: string;
|
||||
image192?: string;
|
||||
image24?: string;
|
||||
image32?: string;
|
||||
image48?: string;
|
||||
image512?: string;
|
||||
image72?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Location where this entity needs to be moved to.
|
||||
*/
|
||||
export interface Destination {
|
||||
/**
|
||||
* The location where to move this entity to.
|
||||
*/
|
||||
location?: Table;
|
||||
/**
|
||||
* The storage class to move this entity to.
|
||||
*/
|
||||
storageClassType?: StorageClassType;
|
||||
/**
|
||||
* The storage service to move this entity to.
|
||||
*/
|
||||
storageServiceType?: StorageService;
|
||||
}
|
||||
|
||||
/**
|
||||
* The location where to move this entity to.
|
||||
*
|
||||
* This schema defines the Location entity. A Location can contain the data of a table or
|
||||
* group other sublocation together.
|
||||
*/
|
||||
export interface Table {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: AllowChangeDescription;
|
||||
/**
|
||||
* Description of a location.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this table. It could be title or label from the source
|
||||
* services.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Followers of this location.
|
||||
*/
|
||||
followers?: OwnerElement[];
|
||||
/**
|
||||
* Fully qualified name of a location in the form `serviceName.locationName`.
|
||||
*/
|
||||
fullyQualifiedName?: string;
|
||||
/**
|
||||
* Link to this location resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier of this location instance.
|
||||
*/
|
||||
id?: string;
|
||||
locationType?: LocationType;
|
||||
/**
|
||||
* Name of a location without the service. For example s3://bucket/path1/path2.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this location.
|
||||
*/
|
||||
owner?: OwnerElement;
|
||||
/**
|
||||
* Link to the database cluster/service where this database is hosted in.
|
||||
*/
|
||||
service: OwnerElement;
|
||||
/**
|
||||
* Tags for this location.
|
||||
*/
|
||||
tags?: TagElement[];
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity.
|
||||
*/
|
||||
updatedAt?: Date;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type used for describing different types of Location.
|
||||
*/
|
||||
export enum LocationType {
|
||||
Bucket = 'Bucket',
|
||||
Database = 'Database',
|
||||
Prefix = 'Prefix',
|
||||
Table = 'Table',
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type for labeling an entity with a Tag.
|
||||
*/
|
||||
export interface TagElement {
|
||||
/**
|
||||
* Unique name of the tag category.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Link to the tag resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
labelType: LabelType;
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
state: State;
|
||||
tagFQN: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
export enum LabelType {
|
||||
Automated = 'Automated',
|
||||
Derived = 'Derived',
|
||||
Manual = 'Manual',
|
||||
Propagated = 'Propagated',
|
||||
}
|
||||
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
export enum State {
|
||||
Confirmed = 'Confirmed',
|
||||
Suggested = 'Suggested',
|
||||
}
|
||||
|
||||
/**
|
||||
* The storage class to move this entity to.
|
||||
*
|
||||
* Type of storage class for the storage service
|
||||
*
|
||||
* Name of the entity field that changed.
|
||||
*
|
||||
* Name of the field of an entity.
|
||||
*
|
||||
* Link to the resource corresponding to this entity.
|
||||
*
|
||||
* URI that points to a resource.
|
||||
*
|
||||
* Unique identifier that identifies this Policy.
|
||||
*
|
||||
* Unique id used to identify an entity.
|
||||
*
|
||||
* Link to the entity resource.
|
||||
*
|
||||
* Link to the tag resource.
|
||||
*
|
||||
* Link to this location resource.
|
||||
*
|
||||
* Link to the resource corresponding to this storage service.
|
||||
*
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*
|
||||
* Unique identifier that identifies a user entity instance.
|
||||
*
|
||||
* Unique identifier of this location instance.
|
||||
*
|
||||
* Unique identifier of this storage service instance.
|
||||
*
|
||||
* Regex that matches the entity FQN.
|
||||
*
|
||||
* Type of storage class offered by S3
|
||||
*
|
||||
* Type of storage class offered by GCS
|
||||
*
|
||||
* Type of storage class offered by ABFS
|
||||
*/
|
||||
export enum StorageClassType {
|
||||
Archive = 'ARCHIVE',
|
||||
Coldline = 'COLDLINE',
|
||||
Cool = 'COOL',
|
||||
DeepArchive = 'DEEP_ARCHIVE',
|
||||
DurableReducedAvailability = 'DURABLE_REDUCED_AVAILABILITY',
|
||||
Glacier = 'GLACIER',
|
||||
Hot = 'HOT',
|
||||
IntelligentTiering = 'INTELLIGENT_TIERING',
|
||||
MultiRegional = 'MULTI_REGIONAL',
|
||||
Nearline = 'NEARLINE',
|
||||
OnezoneIa = 'ONEZONE_IA',
|
||||
Outposts = 'OUTPOSTS',
|
||||
ReducedRedundancy = 'REDUCED_REDUNDANCY',
|
||||
Regional = 'REGIONAL',
|
||||
Standard = 'STANDARD',
|
||||
StandardIa = 'STANDARD_IA',
|
||||
}
|
||||
|
||||
/**
|
||||
* The storage service to move this entity to.
|
||||
*
|
||||
* This schema defines the Storage Service entity, such as S3, GCS, HDFS.
|
||||
*/
|
||||
export interface StorageService {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: AllowChangeDescription;
|
||||
/**
|
||||
* Description of a storage service instance.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this storage service.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Link to the resource corresponding to this storage service.
|
||||
*/
|
||||
href: string;
|
||||
/**
|
||||
* Unique identifier of this storage service instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name that identifies this storage service.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
serviceType: StorageServiceType;
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity.
|
||||
*/
|
||||
updatedAt?: Date;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
export enum StorageServiceType {
|
||||
Abfs = 'ABFS',
|
||||
Gcs = 'GCS',
|
||||
Hdfs = 'HDFS',
|
||||
S3 = 'S3',
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type for labeling an entity with a Tag.
|
||||
*
|
||||
* Entity tags to match on.
|
||||
*/
|
||||
export interface TagLabel {
|
||||
/**
|
||||
* Unique name of the tag category.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Link to the tag resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Label type describes how a tag label was applied. 'Manual' indicates the tag label was
|
||||
* applied by a person. 'Derived' indicates a tag label was derived using the associated tag
|
||||
* relationship (see TagCategory.json for more details). 'Propagated` indicates a tag label
|
||||
* was propagated from upstream based on lineage. 'Automated' is used when a tool was used
|
||||
* to determine the tag label.
|
||||
*/
|
||||
labelType: LabelType;
|
||||
/**
|
||||
* 'Suggested' state is used when a tag label is suggested by users or tools. Owner of the
|
||||
* entity must confirm the suggested labels before it is marked as 'Confirmed'.
|
||||
*/
|
||||
state: State;
|
||||
tagFQN: string;
|
||||
}
|
||||
|
@ -96,12 +96,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -90,12 +90,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
@ -145,6 +148,7 @@ export enum DatabaseServiceType {
|
||||
BigQuery = 'BigQuery',
|
||||
Glue = 'Glue',
|
||||
Hive = 'Hive',
|
||||
MariaDB = 'MariaDB',
|
||||
Mssql = 'MSSQL',
|
||||
MySQL = 'MySQL',
|
||||
Oracle = 'Oracle',
|
||||
|
@ -93,12 +93,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -89,12 +89,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -80,12 +80,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
@ -104,6 +107,7 @@ export interface FieldChange {
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
export enum StorageServiceType {
|
||||
Abfs = 'ABFS',
|
||||
Gcs = 'GCS',
|
||||
Hdfs = 'HDFS',
|
||||
S3 = 'S3',
|
||||
|
@ -90,12 +90,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -87,12 +87,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -112,12 +112,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ export interface ChangeEvent {
|
||||
/**
|
||||
* Current version of the entity after this change. Note that not all changes result in
|
||||
* entity version change. When entity version is not changed, `previousVersion` is same as
|
||||
* `currentVersion`
|
||||
* `currentVersion`.
|
||||
*/
|
||||
currentVersion?: number;
|
||||
/**
|
||||
@ -43,7 +43,7 @@ export interface ChangeEvent {
|
||||
dateTime: Date;
|
||||
/**
|
||||
* For `eventType` `entityCreated`, this field captures JSON coded string of the entity
|
||||
* using the schema corresponding to `entityType`
|
||||
* using the schema corresponding to `entityType`.
|
||||
*/
|
||||
entity?: any;
|
||||
/**
|
||||
@ -58,7 +58,7 @@ export interface ChangeEvent {
|
||||
/**
|
||||
* Version of the entity before this change. Note that not all changes result in entity
|
||||
* version change. When entity version is not changed, `previousVersion` is same as
|
||||
* `currentVersion`
|
||||
* `currentVersion`.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
/**
|
||||
@ -87,12 +87,15 @@ export interface ChangeDescription {
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: FieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface FieldChange {
|
||||
/**
|
||||
* Name of the entity field that changed
|
||||
* Name of the entity field that changed.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
@ -108,7 +111,7 @@ export interface FieldChange {
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of event
|
||||
* Type of event.
|
||||
*/
|
||||
export enum EventType {
|
||||
EntityCreated = 'entityCreated',
|
||||
|
Loading…
x
Reference in New Issue
Block a user