forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ingestion-ui) Add new form for the bigquery-beta connector (data…
- Loading branch information
1 parent
d1e3355
commit a808b2e
Showing
5 changed files
with
161 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ export const BIGQUERY_PROJECT_ID: RecipeField = { | |
name: 'project_id', | ||
label: 'BigQuery Project ID', | ||
tooltip: 'Project ID where you have rights to run queries and create tables.', | ||
placeholder: 'my-project-123', | ||
type: FieldType.TEXT, | ||
fieldPath: 'source.config.project_id', | ||
rules: null, | ||
|
@@ -13,6 +14,7 @@ export const BIGQUERY_CREDENTIAL_PROJECT_ID: RecipeField = { | |
name: 'credential.project_id', | ||
label: 'Credentials Project ID', | ||
tooltip: 'Project id to set the credentials.', | ||
placeholder: 'my-project-123', | ||
type: FieldType.TEXT, | ||
fieldPath: 'source.config.credential.project_id', | ||
rules: null, | ||
|
@@ -22,6 +24,7 @@ export const BIGQUERY_PRIVATE_KEY_ID: RecipeField = { | |
name: 'credential.private_key_id', | ||
label: 'Private Key Id', | ||
tooltip: 'Private key id.', | ||
placeholder: 'BQ_PRIVATE_KEY_ID', | ||
type: FieldType.SECRET, | ||
fieldPath: 'source.config.credential.private_key_id', | ||
rules: null, | ||
|
@@ -30,6 +33,7 @@ export const BIGQUERY_PRIVATE_KEY_ID: RecipeField = { | |
export const BIGQUERY_PRIVATE_KEY: RecipeField = { | ||
name: 'credential.private_key', | ||
label: 'Private Key', | ||
placeholder: 'BQ_PRIVATE_KEY', | ||
tooltip: 'Private key in a form of "-----BEGIN PRIVATE KEY-----\nprivate-key\n-----END PRIVATE KEY-----\n".', | ||
type: FieldType.SECRET, | ||
fieldPath: 'source.config.credential.private_key', | ||
|
@@ -40,6 +44,7 @@ export const BIGQUERY_CLIENT_EMAIL: RecipeField = { | |
name: 'credential.client_email', | ||
label: 'Client Email', | ||
tooltip: 'Client email.', | ||
placeholder: '[email protected]', | ||
type: FieldType.TEXT, | ||
fieldPath: 'source.config.credential.client_email', | ||
rules: null, | ||
|
@@ -49,6 +54,7 @@ export const BIGQUERY_CLIENT_ID: RecipeField = { | |
name: 'credential.client_id', | ||
label: 'Client ID', | ||
tooltip: 'Client ID.', | ||
placeholder: '123456789098765432101', | ||
type: FieldType.TEXT, | ||
fieldPath: 'source.config.credential.client_id', | ||
rules: null, | ||
|
71 changes: 71 additions & 0 deletions
71
datahub-web-react/src/app/ingest/source/builder/RecipeForm/bigqueryBeta.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { FieldType, RecipeField, setListValuesOnRecipe } from './common'; | ||
|
||
export const BIGQUERY_BETA_PROJECT_ID: RecipeField = { | ||
name: 'credential.project_id', | ||
label: 'Project ID', | ||
tooltip: 'Project id to set the credentials.', | ||
placeholder: 'my-project-123', | ||
type: FieldType.TEXT, | ||
fieldPath: 'source.config.credential.project_id', | ||
rules: null, | ||
}; | ||
|
||
const projectIdAllowFieldPath = 'source.config.project_id_pattern.allow'; | ||
export const PROJECT_ALLOW: RecipeField = { | ||
name: 'project_id_pattern.allow', | ||
label: 'Allow Patterns', | ||
tooltip: 'Use regex here to filter for project IDs.', | ||
placeholder: '^my_db$', | ||
type: FieldType.LIST, | ||
buttonLabel: 'Add pattern', | ||
fieldPath: projectIdAllowFieldPath, | ||
rules: null, | ||
section: 'Projects', | ||
setValueOnRecipeOverride: (recipe: any, values: string[]) => | ||
setListValuesOnRecipe(recipe, values, projectIdAllowFieldPath), | ||
}; | ||
|
||
const projectIdDenyFieldPath = 'source.config.project_id_pattern.deny'; | ||
export const PROJECT_DENY: RecipeField = { | ||
name: 'project_id_pattern.deny', | ||
label: 'Deny Patterns', | ||
tooltip: 'Use regex here to filter for project IDs.', | ||
placeholder: '^my_db$', | ||
type: FieldType.LIST, | ||
buttonLabel: 'Add pattern', | ||
fieldPath: projectIdDenyFieldPath, | ||
rules: null, | ||
section: 'Projects', | ||
setValueOnRecipeOverride: (recipe: any, values: string[]) => | ||
setListValuesOnRecipe(recipe, values, projectIdDenyFieldPath), | ||
}; | ||
|
||
const datasetAllowFieldPath = 'source.config.dataset_pattern.allow'; | ||
export const DATASET_ALLOW: RecipeField = { | ||
name: 'dataset_pattern.allow', | ||
label: 'Allow Patterns', | ||
tooltip: 'Use regex here.', | ||
placeholder: '^my_db$', | ||
type: FieldType.LIST, | ||
buttonLabel: 'Add pattern', | ||
fieldPath: datasetAllowFieldPath, | ||
rules: null, | ||
section: 'Datasets', | ||
setValueOnRecipeOverride: (recipe: any, values: string[]) => | ||
setListValuesOnRecipe(recipe, values, datasetAllowFieldPath), | ||
}; | ||
|
||
const datasetDenyFieldPath = 'source.config.dataset_pattern.deny'; | ||
export const DATASET_DENY: RecipeField = { | ||
name: 'dataset_pattern.deny', | ||
label: 'Deny Patterns', | ||
tooltip: 'Use regex here.', | ||
placeholder: '^my_db$', | ||
type: FieldType.LIST, | ||
buttonLabel: 'Add pattern', | ||
fieldPath: datasetDenyFieldPath, | ||
rules: null, | ||
section: 'Datasets', | ||
setValueOnRecipeOverride: (recipe: any, values: string[]) => | ||
setListValuesOnRecipe(recipe, values, datasetDenyFieldPath), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters