Skip to content

Commit ef3b948

Browse files
feat(ingest/vertica): performance improvement and bug fixes (#8328)
Co-authored-by: Harshal Sheth <[email protected]>
1 parent a9bc564 commit ef3b948

File tree

13 files changed

+10631
-544
lines changed

13 files changed

+10631
-544
lines changed

datahub-web-react/src/app/ingest/source/builder/RecipeForm/constants.ts

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ import {
8383
PROJECT_NAME,
8484
} from './lookml';
8585
import { PRESTO, PRESTO_HOST_PORT, PRESTO_DATABASE, PRESTO_USERNAME, PRESTO_PASSWORD } from './presto';
86-
import { BIGQUERY_BETA, DBT_CLOUD, MYSQL, POWER_BI, UNITY_CATALOG } from '../constants';
86+
import { BIGQUERY_BETA, DBT_CLOUD, MYSQL, POWER_BI, UNITY_CATALOG, VERTICA } from '../constants';
8787
import { BIGQUERY_BETA_PROJECT_ID, DATASET_ALLOW, DATASET_DENY, PROJECT_ALLOW, PROJECT_DENY } from './bigqueryBeta';
8888
import { MYSQL_HOST_PORT, MYSQL_PASSWORD, MYSQL_USERNAME } from './mysql';
8989
import { MSSQL, MSSQL_DATABASE, MSSQL_HOST_PORT, MSSQL_PASSWORD, MSSQL_USERNAME } from './mssql';
@@ -130,6 +130,17 @@ import {
130130
WORKSPACE_ID_DENY,
131131
} from './powerbi';
132132

133+
import {
134+
VERTICA_HOST_PORT,
135+
VERTICA_DATABASE,
136+
VERTICA_USERNAME,
137+
VERTICA_PASSWORD,
138+
INCLUDE_PROJECTIONS,
139+
INCLUDE_MLMODELS,
140+
INCLUDE_VIEW_LINEAGE,
141+
INCLUDE_PROJECTIONS_LINEAGE,
142+
} from './vertica';
143+
133144
export enum RecipeSections {
134145
Connection = 0,
135146
Filter = 1,
@@ -428,6 +439,20 @@ export const RECIPE_FIELDS: RecipeFields = {
428439
],
429440
filterSectionTooltip: 'Include or exclude specific PowerBI Workspaces from ingestion.',
430441
},
442+
[VERTICA]: {
443+
fields: [VERTICA_HOST_PORT, VERTICA_DATABASE, VERTICA_USERNAME, VERTICA_PASSWORD],
444+
filterFields: [SCHEMA_ALLOW, SCHEMA_DENY, TABLE_ALLOW, TABLE_DENY, VIEW_ALLOW, VIEW_DENY],
445+
advancedFields: [
446+
INCLUDE_TABLES,
447+
INCLUDE_VIEWS,
448+
INCLUDE_PROJECTIONS,
449+
INCLUDE_MLMODELS,
450+
INCLUDE_VIEW_LINEAGE,
451+
INCLUDE_PROJECTIONS_LINEAGE,
452+
TABLE_PROFILING_ENABLED,
453+
],
454+
filterSectionTooltip: 'Include or exclude specific Schemas, Tables, Views and Projections from ingestion.',
455+
},
431456
};
432457

433458
export const CONNECTORS_WITH_FORM = new Set(Object.keys(RECIPE_FIELDS));
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
import { get } from 'lodash';
2+
import { RecipeField, FieldType } from './common';
3+
4+
export const VERTICA_HOST_PORT: RecipeField = {
5+
name: 'host_port',
6+
label: 'Host and Port',
7+
tooltip:
8+
"The host and port where Vertica is running. For example, 'localhost:5433'. Note: this host must be accessible on the network where DataHub is running (or allowed via an IP Allow List, AWS PrivateLink, etc).",
9+
type: FieldType.TEXT,
10+
fieldPath: 'source.config.host_port',
11+
placeholder: 'localhost:5433',
12+
required: true,
13+
rules: null,
14+
};
15+
16+
export const VERTICA_DATABASE: RecipeField = {
17+
name: 'database',
18+
label: 'Database',
19+
tooltip: 'Ingest metadata for a specific Database.',
20+
type: FieldType.TEXT,
21+
fieldPath: 'source.config.database',
22+
placeholder: 'Vertica_Database',
23+
required: true,
24+
rules: null,
25+
};
26+
27+
export const VERTICA_USERNAME: RecipeField = {
28+
name: 'username',
29+
label: 'Username',
30+
tooltip: 'The Vertica username used to extract metadata.',
31+
type: FieldType.TEXT,
32+
fieldPath: 'source.config.username',
33+
placeholder: 'Vertica_Username',
34+
required: true,
35+
rules: null,
36+
};
37+
38+
export const VERTICA_PASSWORD: RecipeField = {
39+
name: 'password',
40+
label: 'Password',
41+
tooltip: 'The Vertica password for the user.',
42+
type: FieldType.SECRET,
43+
fieldPath: 'source.config.password',
44+
placeholder: 'Vertica_Password',
45+
required: true,
46+
rules: null,
47+
};
48+
49+
const includeProjectionPath = 'source.config.include_projections';
50+
export const INCLUDE_PROJECTIONS: RecipeField = {
51+
name: 'include_projections',
52+
label: 'Include Projections',
53+
tooltip: 'Extract Projections from source.',
54+
type: FieldType.BOOLEAN,
55+
fieldPath: includeProjectionPath,
56+
// This is in accordance with what the ingestion sources do.
57+
getValueFromRecipeOverride: (recipe: any) => {
58+
const includeProjection = get(recipe, includeProjectionPath);
59+
if (includeProjection !== undefined && includeProjection !== null) {
60+
return includeProjection;
61+
}
62+
return true;
63+
},
64+
rules: null,
65+
};
66+
67+
const includemodelsPath = 'source.config.include_models';
68+
export const INCLUDE_MLMODELS: RecipeField = {
69+
name: 'include_models',
70+
label: 'Include ML Models',
71+
tooltip: 'Extract ML models from source.',
72+
type: FieldType.BOOLEAN,
73+
fieldPath: includemodelsPath,
74+
// This is in accordance with what the ingestion sources do.
75+
getValueFromRecipeOverride: (recipe: any) => {
76+
const includeModel = get(recipe, includemodelsPath);
77+
if (includeModel !== undefined && includeModel !== null) {
78+
return includeModel;
79+
}
80+
return true;
81+
},
82+
rules: null,
83+
};
84+
85+
const includeviewlineagePath = 'source.config.include_view_lineage';
86+
export const INCLUDE_VIEW_LINEAGE: RecipeField = {
87+
name: 'include_view_lineage',
88+
label: 'Include View Lineage',
89+
tooltip: 'Extract View Lineage from source.',
90+
type: FieldType.BOOLEAN,
91+
fieldPath: includeviewlineagePath,
92+
// This is in accordance with what the ingestion sources do.
93+
getValueFromRecipeOverride: (recipe: any) => {
94+
const includeviewlineage = get(recipe, includeviewlineagePath);
95+
if (includeviewlineage !== undefined && includeviewlineage !== null) {
96+
return includeviewlineage;
97+
}
98+
return true;
99+
},
100+
rules: null,
101+
};
102+
103+
const includeprojectionlineagePath = 'source.config.include_projection_lineage';
104+
export const INCLUDE_PROJECTIONS_LINEAGE: RecipeField = {
105+
name: 'include_projection_lineage',
106+
label: 'Include Projection Lineage',
107+
tooltip: 'Extract Projection Lineage from source.',
108+
type: FieldType.BOOLEAN,
109+
fieldPath: includeprojectionlineagePath,
110+
// This is in accordance with what the ingestion sources do.
111+
getValueFromRecipeOverride: (recipe: any) => {
112+
const includeprojectionlineage = get(recipe, includeprojectionlineagePath);
113+
if (includeprojectionlineage !== undefined && includeprojectionlineage !== null) {
114+
return includeprojectionlineage;
115+
}
116+
return true;
117+
},
118+
rules: null,
119+
};

datahub-web-react/src/app/ingest/source/builder/sources.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
"name": "vertica",
201201
"displayName": "Vertica",
202202
"docsUrl": "https://datahubproject.io/docs/generated/ingestion/sources/vertica/",
203-
"recipe": "source:\n type: vertica\n config:\n # Coordinates\n host_port: localhost:5433\n # The name of the vertica database\n database: Vmart\n # Credentials\n username: dbadmin\n password:null\n include_tables: true\n include_views: true\n include_projections: true\n include_oauth: true\n include_models: true\n include_view_lineage: true\n include_projection_lineage: true\n profiling:\n enabled: true\n stateful_ingestion:\n enabled: true "
203+
"recipe": "source:\n type: vertica\n config:\n # Coordinates\n host_port: localhost:5433\n # The name of the vertica database\n database: Database_Name\n # Credentials\n username: Vertica_User\n password: Vertica_Password\n\n include_tables: true\n include_views: true\n include_projections: true\n include_models: true\n include_view_lineage: true\n include_projection_lineage: true\n profiling:\n enabled: false\n stateful_ingestion:\n enabled: true "
204204
},
205205
{
206206
"urn": "urn:li:dataPlatform:custom",

metadata-ingestion/docs/sources/vertica/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ The DataHub Vertica Plugin extracts the following:
88
* Metadata for databases, schemas, views, tables, and projections
99
* Table level lineage
1010
* Metadata for ML Models
11-
* Metadata for Vertica OAuth
1211

1312

1413
### Concept Mapping

metadata-ingestion/docs/sources/vertica/vertica_pre.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
In order to ingest metadata from Vertica, you will need:
44

5-
- Vertica Server Version 10.1.1-0 and avobe. It may also work for older versions.
5+
- Vertica Server Version 10.1.1-0 and above. It may also work with, but is not been tested with, older versions .
66
- Vertica Credentials (Username/Password)

metadata-ingestion/docs/sources/vertica/vertica_recipe.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ source:
1212
include_tables: true
1313
include_views: true
1414
include_projections: true
15-
include_oauth: true
1615
include_models: true
1716
include_view_lineage: true
1817
include_projection_lineage: true

metadata-ingestion/setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ def get_long_description():
374374
"nifi": {"requests", "packaging", "requests-gssapi"},
375375
"powerbi": microsoft_common | {"lark[regex]==1.1.4", "sqlparse"},
376376
"powerbi-report-server": powerbi_report_server,
377-
"vertica": sql_common | {"vertica-sqlalchemy-dialect[vertica-python]==0.0.1"},
377+
378+
"vertica": sql_common | {"vertica-sqlalchemy-dialect[vertica-python]==0.0.8"},
379+
378380
"unity-catalog": databricks | sqllineage_lib,
379381
}
380382

@@ -488,7 +490,8 @@ def get_long_description():
488490
"powerbi-report-server",
489491
"salesforce",
490492
"unity-catalog",
491-
"nifi"
493+
"nifi",
494+
"vertica"
492495
# airflow is added below
493496
]
494497
if plugin
@@ -522,7 +525,7 @@ def get_long_description():
522525
"mysql",
523526
"mariadb",
524527
"redash",
525-
# "vertica",
528+
"vertica",
526529
]
527530
for dependency in plugins[plugin]
528531
),

0 commit comments

Comments
 (0)