Skip to content

Commit cee57ac

Browse files
committed
feat(ui/ingest): unity-catalog => databricks
- Change newly-creted Databricks recipes to have `type: databricks` - Support visual RecipeForm for both `databricks` and `unity-catalog` (including platform name and link to documentation at the top).
1 parent 27f8e0f commit cee57ac

File tree

6 files changed

+37
-22
lines changed

6 files changed

+37
-22
lines changed

datahub-web-react/src/app/ingest/source/IngestionSourceList.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,17 @@ enum IngestionSourceType {
105105

106106
const DEFAULT_PAGE_SIZE = 25;
107107

108+
const mapSourceTypeAliases = (source) => {
109+
if (source) {
110+
let { type } = source;
111+
if (type === 'unity-catalog') {
112+
type = 'databricks';
113+
}
114+
return { ...source, type };
115+
}
116+
return undefined;
117+
};
118+
108119
const removeExecutionsFromIngestionSource = (source) => {
109120
if (source) {
110121
return {
@@ -561,7 +572,7 @@ export const IngestionSourceList = ({ showCreateModal, setShowCreateModal }: Pro
561572
</PaginationContainer>
562573
</SourceContainer>
563574
<IngestionSourceBuilderModal
564-
initialState={removeExecutionsFromIngestionSource(focusSource)}
575+
initialState={mapSourceTypeAliases(removeExecutionsFromIngestionSource(focusSource))}
565576
open={isBuildingSource}
566577
onSubmit={onSubmit}
567578
onCancel={onCancel}

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

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@ import {
234234
AZURE,
235235
BIGQUERY_BETA,
236236
CSV,
237+
DATABRICKS,
237238
DBT_CLOUD,
238239
MYSQL,
239240
OKTA,
240241
POWER_BI,
241242
SAC,
242-
UNITY_CATALOG,
243243
VERTICA,
244244
} from '@app/ingest/source/builder/constants';
245245
import { BIGQUERY } from '@app/ingest/source/conf/bigquery/bigquery';
@@ -499,7 +499,7 @@ export const RECIPE_FIELDS: RecipeFields = {
499499
],
500500
filterSectionTooltip: 'Include or exclude specific Schemas, Tables and Views from ingestion.',
501501
},
502-
[UNITY_CATALOG]: {
502+
[DATABRICKS]: {
503503
fields: [WORKSPACE_URL, TOKEN],
504504
filterFields: [
505505
UNITY_METASTORE_ID_ALLOW,
@@ -616,11 +616,4 @@ export const RECIPE_FIELDS: RecipeFields = {
616616

617617
export const CONNECTORS_WITH_FORM = new Set(Object.keys(RECIPE_FIELDS));
618618

619-
export const CONNECTORS_WITH_TEST_CONNECTION = new Set([
620-
SNOWFLAKE,
621-
LOOKER,
622-
BIGQUERY_BETA,
623-
BIGQUERY,
624-
UNITY_CATALOG,
625-
SAC,
626-
]);
619+
export const CONNECTORS_WITH_TEST_CONNECTION = new Set([SNOWFLAKE, LOOKER, BIGQUERY_BETA, BIGQUERY, DATABRICKS, SAC]);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
"recipe": "source: \n type: snowflake\n config:\n account_id: null\n include_table_lineage: true\n include_view_lineage: true\n include_tables: true\n include_views: true\n profiling:\n enabled: true\n profile_table_level_only: true\n stateful_ingestion:\n enabled: true"
2525
},
2626
{
27-
"urn": "urn:li:dataPlatform:unity-catalog",
28-
"name": "unity-catalog",
27+
"urn": "urn:li:dataPlatform:databricks",
28+
"name": "databricks",
2929
"displayName": "Databricks",
3030
"description": "Import Metastores, Schemas, Tables, lineage, queries, and statistics from Databricks Unity Catalog.",
31-
"docsUrl": "https://docs.datahub.com/docs/generated/ingestion/sources/databricks/#module-unity-catalog",
32-
"recipe": "source:\n type: unity-catalog\n config:\n # Coordinates\n workspace_url: null\n include_table_lineage: true\n include_column_lineage: false\n stateful_ingestion:\n enabled: true"
31+
"docsUrl": "https://docs.datahub.com/docs/generated/ingestion/sources/databricks/",
32+
"recipe": "source:\n type: databricks\n config:\n # Coordinates\n workspace_url: null\n include_table_lineage: true\n include_column_lineage: false\n stateful_ingestion:\n enabled: true"
3333
},
3434
{
3535
"urn": "urn:li:dataPlatform:looker",

datahub-web-react/src/app/ingestV2/source/IngestionSourceList.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@ export enum IngestionSourceType {
116116

117117
const DEFAULT_PAGE_SIZE = 25;
118118

119+
const mapSourceTypeAliases = (source) => {
120+
if (source) {
121+
let { type } = source;
122+
if (type === 'unity-catalog') {
123+
type = 'databricks';
124+
}
125+
return { ...source, type };
126+
}
127+
return undefined;
128+
};
129+
119130
const removeExecutionsFromIngestionSource = (source) => {
120131
if (source) {
121132
return {
@@ -691,7 +702,7 @@ export const IngestionSourceList = ({
691702
)}
692703
</SourceContainer>
693704
<IngestionSourceBuilderModal
694-
initialState={removeExecutionsFromIngestionSource(focusSource)}
705+
initialState={mapSourceTypeAliases(removeExecutionsFromIngestionSource(focusSource))}
695706
open={showCreateModal}
696707
onSubmit={onSubmit}
697708
onCancel={onCancel}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,12 @@ import {
233233
import {
234234
AZURE,
235235
CSV,
236+
DATABRICKS,
236237
DBT_CLOUD,
237238
MYSQL,
238239
OKTA,
239240
POWER_BI,
240241
SAC,
241-
UNITY_CATALOG,
242242
VERTICA,
243243
} from '@app/ingestV2/source/builder/constants';
244244
import { BIGQUERY } from '@app/ingestV2/source/conf/bigquery/bigquery';
@@ -471,7 +471,7 @@ export const RECIPE_FIELDS: RecipeFields = {
471471
],
472472
filterSectionTooltip: 'Include or exclude specific Schemas, Tables and Views from ingestion.',
473473
},
474-
[UNITY_CATALOG]: {
474+
[DATABRICKS]: {
475475
fields: [WORKSPACE_URL, TOKEN],
476476
filterFields: [
477477
UNITY_METASTORE_ID_ALLOW,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
"recipe": "source: \n type: snowflake\n config:\n account_id: null\n include_table_lineage: true\n include_view_lineage: true\n include_tables: true\n include_views: true\n profiling:\n enabled: true\n profile_table_level_only: true\n stateful_ingestion:\n enabled: true"
2525
},
2626
{
27-
"urn": "urn:li:dataPlatform:unity-catalog",
28-
"name": "unity-catalog",
27+
"urn": "urn:li:dataPlatform:databricks",
28+
"name": "databricks",
2929
"displayName": "Databricks",
3030
"description": "Import Metastores, Schemas, Tables, lineage, queries, and statistics from Databricks Unity Catalog.",
31-
"docsUrl": "https://docs.datahub.com/docs/generated/ingestion/sources/databricks/#module-unity-catalog",
32-
"recipe": "source:\n type: unity-catalog\n config:\n # Coordinates\n workspace_url: null\n include_table_lineage: true\n include_column_lineage: false\n stateful_ingestion:\n enabled: true"
31+
"docsUrl": "https://docs.datahub.com/docs/generated/ingestion/sources/databricks/",
32+
"recipe": "source:\n type: databricks\n config:\n # Coordinates\n workspace_url: null\n include_table_lineage: true\n include_column_lineage: false\n stateful_ingestion:\n enabled: true"
3333
},
3434
{
3535
"urn": "urn:li:dataPlatform:looker",

0 commit comments

Comments
 (0)