Updates generated interfaces from schema (#1676)

This commit is contained in:
darth-coder00 2021-12-10 21:21:45 +05:30 committed by GitHub
parent 3831bb9e4d
commit b5aabdc535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 19 deletions

View File

@ -103,14 +103,7 @@ export interface ConnectorConfig {
/** /**
* Regex exclude tables or databases that matches the pattern. * Regex exclude tables or databases that matches the pattern.
*/ */
excludeFilterPattern?: excludeFilterPattern?: string[];
| string[]
| boolean
| number
| number
| { [key: string]: any }
| null
| string;
/** /**
* Host and port of the data source. * Host and port of the data source.
*/ */
@ -143,6 +136,7 @@ export enum IngestionType {
Mssql = 'mssql', Mssql = 'mssql',
Mysql = 'mysql', Mysql = 'mysql',
Postgres = 'postgres', Postgres = 'postgres',
Presto = 'presto',
Redshift = 'redshift', Redshift = 'redshift',
RedshiftUsage = 'redshift-usage', RedshiftUsage = 'redshift-usage',
Snowflake = 'snowflake', Snowflake = 'snowflake',

View File

@ -19,7 +19,7 @@ export interface CreatePolicy {
/** /**
* A short description of the Policy, comprehensible to regular users. * A short description of the Policy, comprehensible to regular users.
*/ */
description: string; description?: string;
/** /**
* Title for this Policy. * Title for this Policy.
*/ */
@ -31,7 +31,7 @@ export interface CreatePolicy {
/** /**
* Owner of this Policy. * Owner of this Policy.
*/ */
owner: EntityReference; owner?: EntityReference;
policyType: PolicyType; policyType: PolicyType;
/** /**
* Link to a well documented definition of this Policy. * Link to a well documented definition of this Policy.

View File

@ -30,6 +30,11 @@ export interface Table {
* Reference to Database that contains this table. * Reference to Database that contains this table.
*/ */
database?: EntityReference; database?: EntityReference;
/**
* This captures information about how the table is modeled. Currently only DBT model is
* supported.
*/
dataModel?: DataModel;
/** /**
* Description of a table. * Description of a table.
*/ */
@ -322,6 +327,46 @@ export enum State {
Suggested = 'Suggested', Suggested = 'Suggested',
} }
/**
* This captures information about how the table is modeled. Currently only DBT model is
* supported.
*/
export interface DataModel {
/**
* Columns from the schema defined during modeling. In case of DBT, the metadata here comes
* from `schema.yaml`.
*/
columns?: Column[];
/**
* Description of the Table from the model
*/
description?: string;
generatedAt?: Date;
modelType: ModelType;
/**
* Path to sql definition file.
*/
path?: string;
/**
* This corresponds to rws SQL from `<model_name>.sql` in DBT. This might be null when SQL
* query need not be compiled as done in DBT.
*/
rawSql?: string;
/**
* This corresponds to compile SQL from `<model_name>.sql` in DBT. In cases where
* compilation is not necessary, this corresponds to SQL that created the table.
*/
sql: string;
/**
* Fully qualified name of Models/tables used for in `sql` for creating this table
*/
upstream?: string[];
}
export enum ModelType {
Dbt = 'DBT',
}
/** /**
* Reference to Database that contains this table. * Reference to Database that contains this table.
* *

View File

@ -52,7 +52,7 @@ export interface Policy {
/** /**
* Owner of this Policy. * Owner of this Policy.
*/ */
owner: PolicyOwner; owner?: PolicyOwner;
policyType: PolicyType; policyType: PolicyType;
/** /**
* Link to a well documented definition of this Policy. * Link to a well documented definition of this Policy.

View File

@ -180,14 +180,7 @@ export interface ConnectorConfig {
/** /**
* Regex exclude tables or databases that matches the pattern. * Regex exclude tables or databases that matches the pattern.
*/ */
excludeFilterPattern?: excludeFilterPattern?: string[];
| string[]
| boolean
| number
| number
| { [key: string]: any }
| null
| string;
/** /**
* Host and port of the data source. * Host and port of the data source.
*/ */
@ -238,6 +231,7 @@ export enum IngestionType {
Mssql = 'mssql', Mssql = 'mssql',
Mysql = 'mysql', Mysql = 'mysql',
Postgres = 'postgres', Postgres = 'postgres',
Presto = 'presto',
Redshift = 'redshift', Redshift = 'redshift',
RedshiftUsage = 'redshift-usage', RedshiftUsage = 'redshift-usage',
Snowflake = 'snowflake', Snowflake = 'snowflake',