mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-13 08:37:03 +00:00
Updated typescript interfaces from schema (#2683)
* Updated typescript interfaces from schema * Removed commented code
This commit is contained in:
parent
e442369374
commit
bf76f9a58d
@ -57,7 +57,6 @@ const TableProfiler = ({ tableProfiles, columns }: Props) => {
|
||||
data,
|
||||
min: data?.length ? data[0].min ?? 0 : 0,
|
||||
max: data?.length ? data[0].max ?? 0 : 0,
|
||||
median: data?.length ? data[0].median ?? 0 : 0,
|
||||
};
|
||||
});
|
||||
|
||||
@ -75,7 +74,6 @@ const TableProfiler = ({ tableProfiles, columns }: Props) => {
|
||||
<th className="tableHead-cell">Null Ratio (%)</th>
|
||||
<th className="tableHead-cell">Min</th>
|
||||
<th className="tableHead-cell">Max</th>
|
||||
<th className="tableHead-cell">Median</th>
|
||||
<th className="tableHead-cell">Standard Deviation</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -148,7 +146,6 @@ const TableProfiler = ({ tableProfiles, columns }: Props) => {
|
||||
</td>
|
||||
<td className="tw-relative tableBody-cell">{col.min}</td>
|
||||
<td className="tw-relative tableBody-cell">{col.max}</td>
|
||||
<td className="tw-relative tableBody-cell">{col.median}</td>
|
||||
<td className="tw-relative tableBody-cell profiler-graph">
|
||||
<TableProfilerGraph
|
||||
data={
|
||||
@ -194,9 +191,6 @@ const TableProfiler = ({ tableProfiles, columns }: Props) => {
|
||||
<td className="tw-relative tableBody-cell">
|
||||
{colData.max ?? 0}
|
||||
</td>
|
||||
<td className="tw-relative tableBody-cell">
|
||||
{colData.median ?? 0}
|
||||
</td>
|
||||
<td className="tw-relative tableBody-cell">
|
||||
{colData.stddev ?? 0}
|
||||
</td>
|
||||
|
||||
@ -35,11 +35,11 @@ export interface CreateChart {
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this database
|
||||
* Owner of this chart
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Link to the database service where this database is hosted in
|
||||
* Link to the chart service where this chart is hosted in
|
||||
*/
|
||||
service: EntityReference;
|
||||
/**
|
||||
@ -69,14 +69,14 @@ export enum ChartType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this database
|
||||
* Owner of this chart
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Link to the database service where this database is hosted in
|
||||
* Link to the chart service where this chart is hosted in
|
||||
*
|
||||
* Link to tables used in this chart.
|
||||
*/
|
||||
|
||||
@ -38,15 +38,15 @@ export interface CreateDashboard {
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this database
|
||||
* Owner of this dashboard
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Link to the database service where this database is hosted in
|
||||
* Link to the dashboard service where this dashboard is hosted in
|
||||
*/
|
||||
service: EntityReference;
|
||||
/**
|
||||
* Tags for this chart
|
||||
* Tags for this dashboard
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
}
|
||||
@ -57,9 +57,9 @@ export interface CreateDashboard {
|
||||
* 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 database
|
||||
* Owner of this dashboard
|
||||
*
|
||||
* Link to the database service where this database is hosted in
|
||||
* Link to the dashboard service where this dashboard is hosted in
|
||||
*/
|
||||
export interface EntityReference {
|
||||
/**
|
||||
|
||||
@ -62,6 +62,10 @@ export interface CreateMlModel {
|
||||
* Tags for this ML Model
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* For supervised ML Models, the value to estimate.
|
||||
*/
|
||||
target?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -21,7 +21,7 @@ export interface CreatePipeline {
|
||||
*/
|
||||
concurrency?: number;
|
||||
/**
|
||||
* Description of the database instance. What it has and how to use it.
|
||||
* Description of the pipeline instance. What it has and how to use it.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
@ -34,7 +34,7 @@ export interface CreatePipeline {
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this database
|
||||
* Owner of this pipeline
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
@ -46,7 +46,7 @@ export interface CreatePipeline {
|
||||
*/
|
||||
pipelineUrl?: string;
|
||||
/**
|
||||
* Link to the database service where this database is hosted in
|
||||
* Link to the pipeline service where this pipeline is hosted in
|
||||
*/
|
||||
service: EntityReference;
|
||||
/**
|
||||
@ -64,14 +64,14 @@ export interface CreatePipeline {
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this database
|
||||
* Owner of this pipeline
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Link to the database service where this database is hosted in
|
||||
* Link to the pipeline service where this pipeline is hosted in
|
||||
*/
|
||||
export interface EntityReference {
|
||||
/**
|
||||
|
||||
@ -23,7 +23,7 @@ export interface CreateTable {
|
||||
/**
|
||||
* Database corresponding to this table
|
||||
*/
|
||||
database: string;
|
||||
database: EntityReference;
|
||||
/**
|
||||
* Description of entity instance.
|
||||
*/
|
||||
@ -210,12 +210,14 @@ export enum State {
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this entity
|
||||
* Database corresponding to 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.
|
||||
*
|
||||
* Owner of this entity
|
||||
*/
|
||||
export interface EntityReference {
|
||||
/**
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
export interface CreateThread {
|
||||
/**
|
||||
* Data asset about which this thread is created for with format
|
||||
* <#E/{entities}/{entityName}/{field}/{fieldValue}
|
||||
* <#E/{entities}/{entityType}/{field}/{fieldValue}
|
||||
*/
|
||||
about: string;
|
||||
/**
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add lineage edge between two entities
|
||||
* Add lineage details between two entities
|
||||
*/
|
||||
export interface AddLineage {
|
||||
/**
|
||||
|
||||
@ -1,236 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/*
|
||||
* Copyright 2021 Collate
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Ingestion Config is used to setup a Airflow Ingestion pipeline.
|
||||
*/
|
||||
export interface CreateIngestion {
|
||||
/**
|
||||
* Concurrency of the Pipeline.
|
||||
*/
|
||||
concurrency?: number;
|
||||
connectorConfig: ConnectorConfig;
|
||||
/**
|
||||
* Description of the workflow.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this Ingestion.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* End Date of the workflow.
|
||||
*/
|
||||
endDate?: Date;
|
||||
/**
|
||||
* Deploy the workflow by overwriting existing workflow with the same name.
|
||||
*/
|
||||
forceDeploy?: boolean;
|
||||
ingestionType?: IngestionType;
|
||||
/**
|
||||
* Name that identifies this ingestion instance uniquely.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this Ingestion.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* pause the workflow from running once the deploy is finished successfully.
|
||||
*/
|
||||
pauseWorkflow?: boolean;
|
||||
/**
|
||||
* Retry workflow in case of failure
|
||||
*/
|
||||
retries?: number;
|
||||
/**
|
||||
* Delay between retries in seconds.
|
||||
*/
|
||||
retryDelay?: number;
|
||||
/**
|
||||
* Scheduler Interval for the Workflow in cron format.
|
||||
*/
|
||||
scheduleInterval?: string;
|
||||
/**
|
||||
* Link to the database service where this database is hosted in.
|
||||
*/
|
||||
service: EntityReference;
|
||||
/**
|
||||
* Start date of the workflow.
|
||||
*/
|
||||
startDate: Date;
|
||||
/**
|
||||
* Tags associated with the Ingestion.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* Workflow catchup for past executions.
|
||||
*/
|
||||
workflowCatchup?: boolean;
|
||||
/**
|
||||
* Timeout for the workflow in seconds.
|
||||
*/
|
||||
workflowTimeout?: number;
|
||||
/**
|
||||
* Timezone in which workflow going to be scheduled.
|
||||
*/
|
||||
workflowTimezone?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This defines the configuration for connector.
|
||||
*/
|
||||
export interface ConnectorConfig {
|
||||
/**
|
||||
* Database of the data source.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* Run data profiler as part of ingestion to get table profile data.
|
||||
*/
|
||||
enableDataProfiler?: boolean;
|
||||
/**
|
||||
* Regex exclude tables or databases that matches the pattern.
|
||||
*/
|
||||
excludeFilterPattern?: string[];
|
||||
/**
|
||||
* Host and port of the data source.
|
||||
*/
|
||||
host?: string;
|
||||
/**
|
||||
* Regex to only fetch tables or databases that matches the pattern.
|
||||
*/
|
||||
includeFilterPattern?: string[];
|
||||
/**
|
||||
* optional configuration to turn off fetching metadata for views.
|
||||
*/
|
||||
includeViews?: boolean;
|
||||
/**
|
||||
* password to connect to the data source.
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* username to connect to the data source.
|
||||
*/
|
||||
username?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of Ingestion - Bigquery, Redshift, Snowflake etc...
|
||||
*/
|
||||
export enum IngestionType {
|
||||
Bigquery = 'bigquery',
|
||||
BigqueryUsage = 'bigquery-usage',
|
||||
Hive = 'hive',
|
||||
Mssql = 'mssql',
|
||||
Mysql = 'mysql',
|
||||
Postgres = 'postgres',
|
||||
Presto = 'presto',
|
||||
Redshift = 'redshift',
|
||||
RedshiftUsage = 'redshift-usage',
|
||||
Snowflake = 'snowflake',
|
||||
SnowflakeUsage = 'snowflake-usage',
|
||||
Trino = 'trino',
|
||||
Vertica = 'vertica',
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this Ingestion.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Link to the database 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: 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,518 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/*
|
||||
* Copyright 2021 Collate
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create Policy Entity Request
|
||||
*/
|
||||
export interface CreatePolicy {
|
||||
/**
|
||||
* A short description of the Policy, comprehensible to regular users.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Title for this Policy.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Is the policy enabled.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* UUID of Location where this policy is applied
|
||||
*/
|
||||
location?: string;
|
||||
/**
|
||||
* Name that identifies this Policy.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this Policy.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
policyType: PolicyType;
|
||||
/**
|
||||
* Link to a well documented definition of this Policy.
|
||||
*/
|
||||
policyUrl?: string;
|
||||
rules?: Rule[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this Policy.
|
||||
*
|
||||
* 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 location.
|
||||
*
|
||||
* Owner of this location.
|
||||
*
|
||||
* Link to the database cluster/service where this database is hosted in.
|
||||
*
|
||||
* Owner of this storage service.
|
||||
*/
|
||||
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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type used for describing different types of policies.
|
||||
*/
|
||||
export enum PolicyType {
|
||||
AccessControl = 'AccessControl',
|
||||
Lifecycle = 'Lifecycle',
|
||||
}
|
||||
|
||||
/**
|
||||
* A set of rules associated with the Policy.
|
||||
*
|
||||
* Describes an Access Control Rule for OpenMetadata Metadata Operations. All non-null user
|
||||
* (subject) and entity (object) attributes are evaluated with logical AND.
|
||||
*
|
||||
* Describes an entity Lifecycle Rule used within a Policy.
|
||||
*/
|
||||
export interface Rule {
|
||||
/**
|
||||
* Allow or Deny operation on the entity.
|
||||
*/
|
||||
allow?: boolean;
|
||||
/**
|
||||
* Is the rule enabled.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Entity tag that the rule should match on.
|
||||
*/
|
||||
entityTagAttr?: string;
|
||||
/**
|
||||
* Entity type that the rule should match on.
|
||||
*/
|
||||
entityTypeAttr?: string;
|
||||
/**
|
||||
* Name for this Rule.
|
||||
*
|
||||
* Name that identifies this Rule.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Operation on the entity.
|
||||
*/
|
||||
operation?: Operation;
|
||||
/**
|
||||
* Priority of this rule among all rules across all policies.
|
||||
*/
|
||||
priority?: number;
|
||||
/**
|
||||
* Role of the user that the rule should match on.
|
||||
*/
|
||||
userRoleAttr?: string;
|
||||
/**
|
||||
* A set of actions to take on the entities.
|
||||
*/
|
||||
actions?: LifecycleEAction[];
|
||||
prefixFilter?: string;
|
||||
regexFilter?: string;
|
||||
tagsFilter?: 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?: Location;
|
||||
/**
|
||||
* 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 Location {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Service type where this storage location is hosted in.
|
||||
*/
|
||||
serviceType?: StorageServiceType;
|
||||
/**
|
||||
* Tags for this location.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity in Unix epoch time
|
||||
* milliseconds.
|
||||
*/
|
||||
updatedAt?: number;
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type used for describing different types of Location.
|
||||
*/
|
||||
export enum LocationType {
|
||||
Bucket = 'Bucket',
|
||||
Database = 'Database',
|
||||
Prefix = 'Prefix',
|
||||
Table = 'Table',
|
||||
}
|
||||
|
||||
/**
|
||||
* Service type where this storage location is hosted in.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* UUID of Location where this policy is applied
|
||||
*
|
||||
* Unique id used to identify an entity.
|
||||
*
|
||||
* Unique identifier that identifies an entity instance.
|
||||
*
|
||||
* Unique identifier of this location instance.
|
||||
*
|
||||
* Unique identifier of this storage service instance.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Name of the entity field that changed.
|
||||
*
|
||||
* Name of the field of an entity.
|
||||
*
|
||||
* Prefix path of the entity.
|
||||
*
|
||||
* Regex that matches the entity.
|
||||
*
|
||||
* 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;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Owner of this storage service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
serviceType: StorageServiceType;
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity in Unix epoch time
|
||||
* milliseconds.
|
||||
*/
|
||||
updatedAt?: number;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation on the entity.
|
||||
*
|
||||
* This schema defines all possible operations on metadata of data entities.
|
||||
*/
|
||||
export enum Operation {
|
||||
DecryptTokens = 'DecryptTokens',
|
||||
SuggestDescription = 'SuggestDescription',
|
||||
SuggestTags = 'SuggestTags',
|
||||
UpdateDescription = 'UpdateDescription',
|
||||
UpdateLineage = 'UpdateLineage',
|
||||
UpdateOwner = 'UpdateOwner',
|
||||
UpdateTags = 'UpdateTags',
|
||||
}
|
||||
@ -32,6 +32,10 @@ export interface CreateDashboardService {
|
||||
* Name that identifies the this entity instance uniquely
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this dashboard service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Password to log-into Dashboard Service
|
||||
*/
|
||||
@ -60,6 +64,43 @@ export interface Schedule {
|
||||
startDate?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this dashboard service.
|
||||
*
|
||||
* 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of Dashboard service - Superset, Looker, Redash or Tableau.
|
||||
*/
|
||||
|
||||
@ -16,45 +16,88 @@
|
||||
* Create Database service entity request
|
||||
*/
|
||||
export interface CreateDatabaseService {
|
||||
databaseConnection: DatabaseConnection;
|
||||
/**
|
||||
* Description of Database entity.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Schedule for running metadata ingestion jobs
|
||||
*/
|
||||
ingestionSchedule?: Schedule;
|
||||
jdbc: JDBCInfo;
|
||||
/**
|
||||
* Name that identifies the this entity instance uniquely
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this database service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
serviceType: DatabaseServiceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedule for running metadata ingestion jobs
|
||||
*
|
||||
* This schema defines the type used for the schedule. The schedule has a start time and
|
||||
* repeat frequency.
|
||||
* Database Connection.
|
||||
*/
|
||||
export interface Schedule {
|
||||
export interface DatabaseConnection {
|
||||
/**
|
||||
* Repeat frequency in ISO 8601 duration format. Example - 'P23DT23H'.
|
||||
* Additional connection arguments such as security or protocol configs that can be sent to
|
||||
* service during connection.
|
||||
*/
|
||||
repeatFrequency?: string;
|
||||
connectionArguments?: { [key: string]: any };
|
||||
/**
|
||||
* Start date and time of the schedule.
|
||||
* Additional connection options that can be sent to service during the connection.
|
||||
*/
|
||||
startDate?: Date;
|
||||
connectionOptions?: { [key: string]: any };
|
||||
/**
|
||||
* Database of the data source.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* Host and port of the data source.
|
||||
*/
|
||||
hostPort?: string;
|
||||
/**
|
||||
* password to connect to the data source.
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* username to connect to the data source.
|
||||
*/
|
||||
username?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type for capturing JDBC connector information.
|
||||
* Owner of this database service.
|
||||
*
|
||||
* 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 JDBCInfo {
|
||||
connectionUrl: string;
|
||||
driverClass: string;
|
||||
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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -63,6 +106,7 @@ export interface JDBCInfo {
|
||||
export enum DatabaseServiceType {
|
||||
Athena = 'Athena',
|
||||
BigQuery = 'BigQuery',
|
||||
Db2 = 'Db2',
|
||||
Druid = 'Druid',
|
||||
Glue = 'Glue',
|
||||
Hive = 'Hive',
|
||||
|
||||
@ -32,6 +32,10 @@ export interface CreateMessagingService {
|
||||
* Name that identifies the this entity instance uniquely
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this messaging service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Schema registry URL
|
||||
*/
|
||||
@ -56,6 +60,43 @@ export interface Schedule {
|
||||
startDate?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this messaging service.
|
||||
*
|
||||
* 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of messaging service - Kafka or Pulsar.
|
||||
*/
|
||||
|
||||
@ -28,6 +28,10 @@ export interface CreatePipelineService {
|
||||
* Name that identifies the this entity instance uniquely
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this pipeline service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Pipeline UI URL
|
||||
*/
|
||||
@ -52,6 +56,43 @@ export interface Schedule {
|
||||
startDate?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this pipeline service.
|
||||
*
|
||||
* 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of pipeline service - Airflow or Prefect.
|
||||
*/
|
||||
|
||||
@ -24,9 +24,50 @@ export interface CreateStorageService {
|
||||
* Name that identifies the this entity instance uniquely
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this storage service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
serviceType?: StorageServiceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this storage service.
|
||||
*
|
||||
* 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Role entity
|
||||
* Request for creating a Role entity
|
||||
*/
|
||||
export interface CreateRole {
|
||||
/**
|
||||
|
||||
@ -180,6 +180,7 @@ export interface EntityReference {
|
||||
export enum DatabaseServiceType {
|
||||
Athena = 'Athena',
|
||||
BigQuery = 'BigQuery',
|
||||
Db2 = 'Db2',
|
||||
Druid = 'Druid',
|
||||
Glue = 'Glue',
|
||||
Hive = 'Hive',
|
||||
|
||||
@ -86,6 +86,10 @@ export interface Mlmodel {
|
||||
* Tags for this ML Model.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* For supervised ML Models, the value to estimate.
|
||||
*/
|
||||
target?: string;
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity in Unix epoch time
|
||||
* milliseconds.
|
||||
|
||||
@ -476,6 +476,7 @@ export interface TableData {
|
||||
export enum DatabaseServiceType {
|
||||
Athena = 'Athena',
|
||||
BigQuery = 'BigQuery',
|
||||
Db2 = 'Db2',
|
||||
Druid = 'Druid',
|
||||
Glue = 'Glue',
|
||||
Hive = 'Hive',
|
||||
@ -534,22 +535,45 @@ export interface TableProfile {
|
||||
* This schema defines the type to capture the table's column profile.
|
||||
*/
|
||||
export interface ColumnProfile {
|
||||
/**
|
||||
* Number of values that contain distinct values.
|
||||
*/
|
||||
distinctCount?: number;
|
||||
/**
|
||||
* No.of Rows that contain duplicates in a column.
|
||||
*/
|
||||
duplicateCount?: number;
|
||||
/**
|
||||
* Histogram of a column.
|
||||
*/
|
||||
histogram?:
|
||||
| any[]
|
||||
| boolean
|
||||
| number
|
||||
| number
|
||||
| null
|
||||
| HistogramObject
|
||||
| string;
|
||||
/**
|
||||
* Maximum value in a column.
|
||||
*/
|
||||
max?: string;
|
||||
max?: number;
|
||||
/**
|
||||
* Avg value in a column.
|
||||
*/
|
||||
mean?: string;
|
||||
/**
|
||||
* Median value in a column.
|
||||
*/
|
||||
median?: string;
|
||||
mean?: number;
|
||||
/**
|
||||
* Minimum value in a column.
|
||||
*/
|
||||
min?: string;
|
||||
min?: number;
|
||||
/**
|
||||
* Missing count is calculated by subtracting valuesCount - validCount.
|
||||
*/
|
||||
missingCount?: number;
|
||||
/**
|
||||
* Missing Percentage is calculated by taking percentage of validCount/valuesCount.
|
||||
*/
|
||||
missingPercentage?: number;
|
||||
/**
|
||||
* Column Name.
|
||||
*/
|
||||
@ -566,6 +590,10 @@ export interface ColumnProfile {
|
||||
* Standard deviation of a column.
|
||||
*/
|
||||
stddev?: number;
|
||||
/**
|
||||
* Median value in a column.
|
||||
*/
|
||||
sum?: number;
|
||||
/**
|
||||
* No. of unique values in the column.
|
||||
*/
|
||||
@ -574,6 +602,33 @@ export interface ColumnProfile {
|
||||
* Proportion of number of unique values in a column.
|
||||
*/
|
||||
uniqueProportion?: number;
|
||||
/**
|
||||
* Total count of valid values in this column.
|
||||
*/
|
||||
validCount?: number;
|
||||
/**
|
||||
* Total count of the values in this column.
|
||||
*/
|
||||
valuesCount?: number;
|
||||
/**
|
||||
* Percentage of values in this column with respect to rowcount.
|
||||
*/
|
||||
valuesPercentage?: number;
|
||||
/**
|
||||
* Variance of a column.
|
||||
*/
|
||||
variance?: number;
|
||||
}
|
||||
|
||||
export interface HistogramObject {
|
||||
/**
|
||||
* Boundaries of Histogram.
|
||||
*/
|
||||
boundaries?: any[];
|
||||
/**
|
||||
* Frequencies of Histogram.
|
||||
*/
|
||||
frequencies?: any[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -26,11 +26,11 @@ export interface Rule {
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Entity tag that the rule should match on
|
||||
* Entity tag that the rule should match on.
|
||||
*/
|
||||
entityTagAttr?: string;
|
||||
/**
|
||||
* Entity type that the rule should match on
|
||||
* Entity type that the rule should match on.
|
||||
*/
|
||||
entityTypeAttr?: string;
|
||||
/**
|
||||
@ -42,11 +42,11 @@ export interface Rule {
|
||||
*/
|
||||
operation?: Operation;
|
||||
/**
|
||||
* Priority of this rule among other rules in this policy.
|
||||
* Priority of this rule among all rules across all policies.
|
||||
*/
|
||||
priority?: number;
|
||||
/**
|
||||
* Role of the user that the rule should match on
|
||||
* Role of the user that the rule should match on.
|
||||
*/
|
||||
userRoleAttr?: string;
|
||||
}
|
||||
@ -54,9 +54,10 @@ export interface Rule {
|
||||
/**
|
||||
* Operation on the entity.
|
||||
*
|
||||
* This schema defines all possible operations on metadata of data entities
|
||||
* This schema defines all possible operations on metadata of data entities.
|
||||
*/
|
||||
export enum Operation {
|
||||
DecryptTokens = 'DecryptTokens',
|
||||
SuggestDescription = 'SuggestDescription',
|
||||
SuggestTags = 'SuggestTags',
|
||||
UpdateDescription = 'UpdateDescription',
|
||||
|
||||
@ -177,6 +177,8 @@ export interface FieldChange {
|
||||
* Owner of this location.
|
||||
*
|
||||
* Link to the database cluster/service where this database is hosted in.
|
||||
*
|
||||
* Owner of this storage service.
|
||||
*/
|
||||
export interface EntityReference {
|
||||
/**
|
||||
@ -283,7 +285,7 @@ export enum State {
|
||||
/**
|
||||
* The storage class to move this entity to.
|
||||
*
|
||||
* Type of storage class for the storage service
|
||||
* Type of storage class for the storage service.
|
||||
*
|
||||
* Name of the entity field that changed.
|
||||
*
|
||||
@ -307,11 +309,11 @@ export enum State {
|
||||
*
|
||||
* Unique identifier of this storage service instance.
|
||||
*
|
||||
* Type of storage class offered by S3
|
||||
* Type of storage class offered by S3.
|
||||
*
|
||||
* Type of storage class offered by GCS
|
||||
* Type of storage class offered by GCS.
|
||||
*
|
||||
* Type of storage class offered by ABFS
|
||||
* Type of storage class offered by ABFS.
|
||||
*/
|
||||
export enum StorageClassType {
|
||||
Archive = 'ARCHIVE',
|
||||
@ -366,6 +368,10 @@ export interface StorageService {
|
||||
* Name that identifies this storage service.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this storage service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
|
||||
@ -0,0 +1,424 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/*
|
||||
* Copyright 2021 Collate
|
||||
* Licensed 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[];
|
||||
/**
|
||||
* Is the rule enabled.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Name that identifies this Rule.
|
||||
*/
|
||||
name?: string;
|
||||
prefixFilter?: string;
|
||||
regexFilter?: string;
|
||||
tagsFilter?: 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?: Location;
|
||||
/**
|
||||
* 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 Location {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Service type where this storage location is hosted in.
|
||||
*/
|
||||
serviceType?: StorageServiceType;
|
||||
/**
|
||||
* Tags for this location.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity in Unix epoch time
|
||||
* milliseconds.
|
||||
*/
|
||||
updatedAt?: number;
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* Owner of this storage service.
|
||||
*/
|
||||
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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
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',
|
||||
}
|
||||
|
||||
/**
|
||||
* Service type where this storage location is hosted in.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* Prefix path of the entity.
|
||||
*
|
||||
* Regex that matches the entity.
|
||||
*
|
||||
* 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;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Owner of this storage service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
serviceType: StorageServiceType;
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity in Unix epoch time
|
||||
* milliseconds.
|
||||
*/
|
||||
updatedAt?: number;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
@ -0,0 +1,627 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/*
|
||||
* Copyright 2021 Collate
|
||||
* Licensed 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 Policy entity. A Policy defines lifecycle or access control that
|
||||
* needs to be applied across different Data Entities.
|
||||
*/
|
||||
export interface Policy {
|
||||
/**
|
||||
* Change that led to this version of the Policy.
|
||||
*/
|
||||
changeDescription?: PolicyChangeDescription;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* A short description of the Policy, comprehensible to regular users.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Title for this Policy.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* Is the policy enabled.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Name that uniquely identifies a Policy.
|
||||
*/
|
||||
fullyQualifiedName?: string;
|
||||
/**
|
||||
* Link to the resource corresponding to this entity.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier that identifies this Policy.
|
||||
*/
|
||||
id: string;
|
||||
location?: LocationClass;
|
||||
/**
|
||||
* Name that uniquely identifies this Policy.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this Policy.
|
||||
*/
|
||||
owner?: LocationClass;
|
||||
policyType: PolicyType;
|
||||
/**
|
||||
* Link to a well documented definition of this Policy.
|
||||
*/
|
||||
policyUrl?: string;
|
||||
rules?: Rule[];
|
||||
/**
|
||||
* Last update time corresponding to the new version of the Policy in Unix epoch time
|
||||
* milliseconds.
|
||||
*/
|
||||
updatedAt?: number;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the Policy.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change that led to this version of the Policy.
|
||||
*
|
||||
* Description of the change.
|
||||
*/
|
||||
export interface PolicyChangeDescription {
|
||||
/**
|
||||
* Names of fields added during the version changes.
|
||||
*/
|
||||
fieldsAdded?: PurpleFieldChange[];
|
||||
/**
|
||||
* Fields deleted during the version changes with old value before deleted.
|
||||
*/
|
||||
fieldsDeleted?: PurpleFieldChange[];
|
||||
/**
|
||||
* Fields modified during the version changes with old and new values.
|
||||
*/
|
||||
fieldsUpdated?: PurpleFieldChange[];
|
||||
/**
|
||||
* When a change did not result in change, this could be same as the current version.
|
||||
*/
|
||||
previousVersion?: number;
|
||||
}
|
||||
|
||||
export interface PurpleFieldChange {
|
||||
/**
|
||||
* 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 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 Policy.
|
||||
*/
|
||||
export interface LocationClass {
|
||||
/**
|
||||
* 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This schema defines the type used for describing different types of policies.
|
||||
*/
|
||||
export enum PolicyType {
|
||||
AccessControl = 'AccessControl',
|
||||
Lifecycle = 'Lifecycle',
|
||||
}
|
||||
|
||||
/**
|
||||
* A set of rules associated with the Policy.
|
||||
*
|
||||
* Describes an Access Control Rule for OpenMetadata Metadata Operations. All non-null user
|
||||
* (subject) and entity (object) attributes are evaluated with logical AND.
|
||||
*
|
||||
* Describes an entity Lifecycle Rule used within a Policy.
|
||||
*/
|
||||
export interface Rule {
|
||||
/**
|
||||
* Allow or Deny operation on the entity.
|
||||
*/
|
||||
allow?: boolean;
|
||||
/**
|
||||
* Is the rule enabled.
|
||||
*/
|
||||
enabled?: boolean;
|
||||
/**
|
||||
* Entity tag that the rule should match on.
|
||||
*/
|
||||
entityTagAttr?: string;
|
||||
/**
|
||||
* Entity type that the rule should match on.
|
||||
*/
|
||||
entityTypeAttr?: string;
|
||||
/**
|
||||
* Name for this Rule.
|
||||
*
|
||||
* Name that identifies this Rule.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Operation on the entity.
|
||||
*/
|
||||
operation?: Operation;
|
||||
/**
|
||||
* Priority of this rule among all rules across all policies.
|
||||
*/
|
||||
priority?: number;
|
||||
/**
|
||||
* Role of the user that the rule should match on.
|
||||
*/
|
||||
userRoleAttr?: string;
|
||||
/**
|
||||
* A set of actions to take on the entities.
|
||||
*/
|
||||
actions?: LifecycleEAction[];
|
||||
prefixFilter?: string;
|
||||
regexFilter?: string;
|
||||
tagsFilter?: 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?: Location;
|
||||
/**
|
||||
* 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 Location {
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: LocationChangeDescription;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Service type where this storage location is hosted in.
|
||||
*/
|
||||
serviceType?: StorageServiceType;
|
||||
/**
|
||||
* Tags for this location.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity in Unix epoch time
|
||||
* milliseconds.
|
||||
*/
|
||||
updatedAt?: number;
|
||||
/**
|
||||
* 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 LocationChangeDescription {
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* Owner of this storage service.
|
||||
*/
|
||||
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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
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',
|
||||
}
|
||||
|
||||
/**
|
||||
* Service type where this storage location is hosted in.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
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 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 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 identifier of this location instance.
|
||||
*
|
||||
* Unique identifier of this storage service instance.
|
||||
*
|
||||
* Prefix path of the entity.
|
||||
*
|
||||
* Regex that matches the entity.
|
||||
*
|
||||
* 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?: LocationChangeDescription;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Owner of this storage service.
|
||||
*/
|
||||
owner?: OwnerElement;
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
serviceType: StorageServiceType;
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity in Unix epoch time
|
||||
* milliseconds.
|
||||
*/
|
||||
updatedAt?: number;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation on the entity.
|
||||
*
|
||||
* This schema defines all possible operations on metadata of data entities.
|
||||
*/
|
||||
export enum Operation {
|
||||
DecryptTokens = 'DecryptTokens',
|
||||
SuggestDescription = 'SuggestDescription',
|
||||
SuggestTags = 'SuggestTags',
|
||||
UpdateDescription = 'UpdateDescription',
|
||||
UpdateLineage = 'UpdateLineage',
|
||||
UpdateOwner = 'UpdateOwner',
|
||||
UpdateTags = 'UpdateTags',
|
||||
}
|
||||
@ -52,6 +52,10 @@ export interface DashboardService {
|
||||
* Name that identifies this dashboard service.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this dashboard service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Password to log-into Dashboard Service.
|
||||
*/
|
||||
@ -137,6 +141,43 @@ export interface Schedule {
|
||||
startDate?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this dashboard service.
|
||||
*
|
||||
* 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of dashboard service such as Looker or Superset...
|
||||
*
|
||||
|
||||
@ -18,10 +18,15 @@
|
||||
* instance are also used for database service.
|
||||
*/
|
||||
export interface DatabaseService {
|
||||
/**
|
||||
* References to airflow pipelines deployed for this database service.
|
||||
*/
|
||||
airflowPipelines?: EntityReference[];
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
databaseConnection: DatabaseConnection;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
@ -42,18 +47,14 @@ export interface DatabaseService {
|
||||
* Unique identifier of this database service instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Schedule for running metadata ingestion jobs.
|
||||
*/
|
||||
ingestionSchedule?: Schedule;
|
||||
/**
|
||||
* JDBC connection information.
|
||||
*/
|
||||
jdbc: JDBCInfo;
|
||||
/**
|
||||
* Name that identifies this database service.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this database service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Type of database service such as MySQL, BigQuery, Snowflake, Redshift, Postgres...
|
||||
*/
|
||||
@ -73,6 +74,45 @@ export interface DatabaseService {
|
||||
version?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* References to airflow pipelines deployed for this database service.
|
||||
*
|
||||
* 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 database service.
|
||||
*/
|
||||
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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change that lead to this version of the entity.
|
||||
*
|
||||
@ -115,30 +155,34 @@ export interface FieldChange {
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedule for running metadata ingestion jobs.
|
||||
*
|
||||
* This schema defines the type used for the schedule. The schedule has a start time and
|
||||
* repeat frequency.
|
||||
* Database Connection.
|
||||
*/
|
||||
export interface Schedule {
|
||||
export interface DatabaseConnection {
|
||||
/**
|
||||
* Repeat frequency in ISO 8601 duration format. Example - 'P23DT23H'.
|
||||
* Additional connection arguments such as security or protocol configs that can be sent to
|
||||
* service during connection.
|
||||
*/
|
||||
repeatFrequency?: string;
|
||||
connectionArguments?: { [key: string]: any };
|
||||
/**
|
||||
* Start date and time of the schedule.
|
||||
* Additional connection options that can be sent to service during the connection.
|
||||
*/
|
||||
startDate?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* JDBC connection information.
|
||||
*
|
||||
* Type for capturing JDBC connector information.
|
||||
*/
|
||||
export interface JDBCInfo {
|
||||
connectionUrl: string;
|
||||
driverClass: string;
|
||||
connectionOptions?: { [key: string]: any };
|
||||
/**
|
||||
* Database of the data source.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* Host and port of the data source.
|
||||
*/
|
||||
hostPort?: string;
|
||||
/**
|
||||
* password to connect to the data source.
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* username to connect to the data source.
|
||||
*/
|
||||
username?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -147,6 +191,7 @@ export interface JDBCInfo {
|
||||
export enum DatabaseServiceType {
|
||||
Athena = 'Athena',
|
||||
BigQuery = 'BigQuery',
|
||||
Db2 = 'Db2',
|
||||
Druid = 'Druid',
|
||||
Glue = 'Glue',
|
||||
Hive = 'Hive',
|
||||
|
||||
@ -53,6 +53,10 @@ export interface MessagingService {
|
||||
* Name that identifies this messaging service.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this messaging service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Schema registry URL.
|
||||
*/
|
||||
@ -134,6 +138,43 @@ export interface Schedule {
|
||||
startDate?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this messaging service.
|
||||
*
|
||||
* 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of messaging service such as Kafka or Pulsar...
|
||||
*
|
||||
|
||||
@ -49,6 +49,10 @@ export interface PipelineService {
|
||||
* Name that identifies this pipeline service.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this pipeline service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Pipeline Service Management/UI URL.
|
||||
*/
|
||||
@ -130,6 +134,43 @@ export interface Schedule {
|
||||
startDate?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this pipeline service.
|
||||
*
|
||||
* 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of pipeline service such as Airflow or Prefect...
|
||||
*
|
||||
|
||||
@ -44,6 +44,10 @@ export interface StorageService {
|
||||
* Name that identifies this storage service.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Owner of this storage service.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
@ -104,6 +108,43 @@ export interface FieldChange {
|
||||
oldValue?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this storage service.
|
||||
*
|
||||
* 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of storage service such as S3, GCS, HDFS...
|
||||
*/
|
||||
|
||||
@ -29,6 +29,10 @@ export interface TagCategory {
|
||||
children?: Array<
|
||||
any[] | boolean | TagClass | number | number | null | string
|
||||
>;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* Description of the tag category.
|
||||
*/
|
||||
@ -125,6 +129,10 @@ export interface TagClass {
|
||||
children?: Array<
|
||||
any[] | boolean | TagClass | number | number | null | string
|
||||
>;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* If the tag is deprecated.
|
||||
*/
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This schema defines the Role entity. A Role has access to zero or more data assets
|
||||
* This schema defines the Role entity. A Role has access to zero or more data assets.
|
||||
*/
|
||||
export interface Role {
|
||||
/**
|
||||
|
||||
@ -1,336 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/*
|
||||
* Copyright 2021 Collate
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Ingestion Config is used to setup a Airflow Ingestion pipeline.
|
||||
*/
|
||||
export interface Ingestion {
|
||||
/**
|
||||
* Change that led to this version of the entity.
|
||||
*/
|
||||
changeDescription?: ChangeDescription;
|
||||
/**
|
||||
* Concurrency of the Pipeline.
|
||||
*/
|
||||
concurrency?: number;
|
||||
connectorConfig: ConnectorConfig;
|
||||
/**
|
||||
* When `true` indicates the entity has been soft deleted.
|
||||
*/
|
||||
deleted?: boolean;
|
||||
/**
|
||||
* Description of the workflow.
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Display Name that identifies this Ingestion.
|
||||
*/
|
||||
displayName?: string;
|
||||
/**
|
||||
* End Date of the workflow.
|
||||
*/
|
||||
endDate?: Date;
|
||||
/**
|
||||
* Deploy the workflow by overwriting existing workflow with the same name.
|
||||
*/
|
||||
forceDeploy?: boolean;
|
||||
/**
|
||||
* Name that uniquely identifies a Ingestion.
|
||||
*/
|
||||
fullyQualifiedName?: string;
|
||||
/**
|
||||
* Link to this ingestion resource.
|
||||
*/
|
||||
href?: string;
|
||||
/**
|
||||
* Unique identifier that identifies this Ingestion.
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* List of executions and status for the Ingestion Pipeline.
|
||||
*/
|
||||
ingestionStatuses?: IngestionStatus[];
|
||||
ingestionType?: IngestionType;
|
||||
/**
|
||||
* Name that identifies this ingestion instance uniquely.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Next execution date from the underlying workflow platform once the ingestion scheduled.
|
||||
*/
|
||||
nextExecutionDate?: Date;
|
||||
/**
|
||||
* Owner of this Ingestion.
|
||||
*/
|
||||
owner?: EntityReference;
|
||||
/**
|
||||
* pause the workflow from running once the deploy is finished successfully.
|
||||
*/
|
||||
pauseWorkflow?: boolean;
|
||||
/**
|
||||
* Retry workflow in case of failure.
|
||||
*/
|
||||
retries?: number;
|
||||
/**
|
||||
* Delay between retries in seconds.
|
||||
*/
|
||||
retryDelay?: number;
|
||||
/**
|
||||
* Scheduler Interval for the Workflow in cron format.
|
||||
*/
|
||||
scheduleInterval?: string;
|
||||
/**
|
||||
* Link to the database service where this database is hosted in.
|
||||
*/
|
||||
service: EntityReference;
|
||||
/**
|
||||
* Start date of the workflow.
|
||||
*/
|
||||
startDate: Date;
|
||||
/**
|
||||
* Tags associated with the Ingestion.
|
||||
*/
|
||||
tags?: TagLabel[];
|
||||
/**
|
||||
* Last update time corresponding to the new version of the entity in Unix epoch time
|
||||
* milliseconds.
|
||||
*/
|
||||
updatedAt?: number;
|
||||
/**
|
||||
* User who made the update.
|
||||
*/
|
||||
updatedBy?: string;
|
||||
/**
|
||||
* Metadata version of the entity.
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* Run past executions if the start date is in the past.
|
||||
*/
|
||||
workflowCatchup?: boolean;
|
||||
/**
|
||||
* Timeout for the workflow in seconds.
|
||||
*/
|
||||
workflowTimeout?: number;
|
||||
/**
|
||||
* Timezone in which workflow going to be scheduled.
|
||||
*/
|
||||
workflowTimezone?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change that led 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 defines the configuration for connector.
|
||||
*/
|
||||
export interface ConnectorConfig {
|
||||
/**
|
||||
* Database of the data source.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* Run data profiler as part of ingestion to get table profile data.
|
||||
*/
|
||||
enableDataProfiler?: boolean;
|
||||
/**
|
||||
* Regex exclude tables or databases that matches the pattern.
|
||||
*/
|
||||
excludeFilterPattern?: string[];
|
||||
/**
|
||||
* Host and port of the data source.
|
||||
*/
|
||||
host?: string;
|
||||
/**
|
||||
* Regex to only fetch tables or databases that matches the pattern.
|
||||
*/
|
||||
includeFilterPattern?: string[];
|
||||
/**
|
||||
* optional configuration to turn off fetching metadata for views.
|
||||
*/
|
||||
includeViews?: boolean;
|
||||
/**
|
||||
* password to connect to the data source.
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* username to connect to the data source.
|
||||
*/
|
||||
username?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* This defines the runtime status of Ingestion.
|
||||
*/
|
||||
export interface IngestionStatus {
|
||||
/**
|
||||
* endDate of the Ingestion pipeline run for this particular execution.
|
||||
*/
|
||||
endDate?: string;
|
||||
/**
|
||||
* startDate of the Ingestion Pipeline run for this particular execution.
|
||||
*/
|
||||
startDate?: string;
|
||||
/**
|
||||
* Workflow status denotes if its failed or succeeded.
|
||||
*/
|
||||
state?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of Ingestion - Bigquery, Redshift, Snowflake etc...
|
||||
*/
|
||||
export enum IngestionType {
|
||||
Bigquery = 'bigquery',
|
||||
BigqueryUsage = 'bigquery-usage',
|
||||
Hive = 'hive',
|
||||
Mssql = 'mssql',
|
||||
Mysql = 'mysql',
|
||||
Postgres = 'postgres',
|
||||
Presto = 'presto',
|
||||
Redshift = 'redshift',
|
||||
RedshiftUsage = 'redshift-usage',
|
||||
Snowflake = 'snowflake',
|
||||
SnowflakeUsage = 'snowflake-usage',
|
||||
Trino = 'trino',
|
||||
Vertica = 'vertica',
|
||||
}
|
||||
|
||||
/**
|
||||
* Owner of this Ingestion.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Link to the database 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`, `databaseService`,
|
||||
* `dashboardService`...
|
||||
*/
|
||||
type: 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',
|
||||
}
|
||||
@ -116,5 +116,6 @@ export interface FieldChange {
|
||||
export enum EventType {
|
||||
EntityCreated = 'entityCreated',
|
||||
EntityDeleted = 'entityDeleted',
|
||||
EntitySoftDeleted = 'entitySoftDeleted',
|
||||
EntityUpdated = 'entityUpdated',
|
||||
}
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/*
|
||||
* Copyright 2021 Collate
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Database Connection Config to capture connection details to a database service.
|
||||
*/
|
||||
export interface DatabaseConnectionConfig {
|
||||
/**
|
||||
* Database of the data source.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* Run data profiler as part of ingestion to get table profile data.
|
||||
*/
|
||||
enableDataProfiler?: boolean;
|
||||
/**
|
||||
* Regex exclude tables or databases that matches the pattern.
|
||||
*/
|
||||
excludeFilterPattern?: string[];
|
||||
/**
|
||||
* Turn on/off collecting sample data.
|
||||
*/
|
||||
generateSampleData?: boolean;
|
||||
/**
|
||||
* Host and port of the data source.
|
||||
*/
|
||||
hostPort?: string;
|
||||
/**
|
||||
* Regex to only fetch tables or databases that matches the pattern.
|
||||
*/
|
||||
includeFilterPattern?: string[];
|
||||
/**
|
||||
* Optional configuration to turn off fetching metadata for tables.
|
||||
*/
|
||||
includeTables?: boolean;
|
||||
/**
|
||||
* optional configuration to turn off fetching metadata for views.
|
||||
*/
|
||||
includeViews?: boolean;
|
||||
/**
|
||||
* password to connect to the data source.
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* query to generate sample data.
|
||||
*/
|
||||
sampleDataQuery?: string;
|
||||
/**
|
||||
* schema of the data source.
|
||||
*/
|
||||
schema?: string;
|
||||
/**
|
||||
* username to connect to the data source.
|
||||
*/
|
||||
username?: string;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user