Skip to content

Commit 43e2c93

Browse files
committed
feat(ingestion/dbt): Add database and schema filtering to dbt_cloud file
1 parent b262307 commit 43e2c93

File tree

1 file changed

+56
-0
lines changed
  • datahub-web-react/src/app/ingest/source/builder/RecipeForm

1 file changed

+56
-0
lines changed

datahub-web-react/src/app/ingest/source/builder/RecipeForm/dbt_cloud.tsx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,62 @@ export const NODE_DENY: RecipeField = {
233233
section: 'Nodes',
234234
};
235235

236+
const databaseAllowFieldPath = 'source.config.database_name_pattern.allow';
237+
export const DATABASE_ALLOW: RecipeField = {
238+
name: 'database_name_pattern.allow',
239+
label: 'Allow Database Patterns',
240+
tooltip:
241+
'Only include specific dbt Databases by providing their name, or a Regular Expression (REGEX). If not provided, all Databases will be included.',
242+
placeholder: 'database_name',
243+
type: FieldType.LIST,
244+
buttonLabel: 'Add pattern',
245+
fieldPath: databaseAllowFieldPath,
246+
rules: null,
247+
section: 'Databases',
248+
};
249+
250+
const databaseDenyFieldPath = 'source.config.database_name_pattern.deny';
251+
export const DATABASE_DENY: RecipeField = {
252+
name: 'database_name_pattern.deny',
253+
label: 'Deny Database Patterns',
254+
tooltip:
255+
'Exclude specific dbt Databases by providing their name, or a Regular Expression (REGEX). If not provided, all Databases will be included. Deny patterns always take precedence over Allow patterns.',
256+
placeholder: 'database_name',
257+
type: FieldType.LIST,
258+
buttonLabel: 'Add pattern',
259+
fieldPath: databaseDenyFieldPath,
260+
rules: null,
261+
section: 'Databases',
262+
};
263+
264+
const schemaAllowFieldPath = 'source.config.schema_name_pattern.allow';
265+
export const SCHEMA_ALLOW: RecipeField = {
266+
name: 'schema_name_pattern.allow',
267+
label: 'Allow Schema Patterns',
268+
tooltip:
269+
'Only include specific dbt Schemas by providing their name, or a Regular Expression (REGEX). If not provided, all Schemas will be included.',
270+
placeholder: 'schema_name',
271+
type: FieldType.LIST,
272+
buttonLabel: 'Add pattern',
273+
fieldPath: schemaAllowFieldPath,
274+
rules: null,
275+
section: 'Schemas',
276+
};
277+
278+
const schemaDenyFieldPath = 'source.config.schema_name_pattern.deny';
279+
export const SCHEMA_DENY: RecipeField = {
280+
name: 'schema_name_pattern.deny',
281+
label: 'Deny Schema Patterns',
282+
tooltip:
283+
'Exclude specific dbt Schemas by providing their name, or a Regular Expression (REGEX). If not provided, all Schemas will be included. Deny patterns always take precedence over Allow patterns.',
284+
placeholder: 'schema_name',
285+
type: FieldType.LIST,
286+
buttonLabel: 'Add pattern',
287+
fieldPath: schemaDenyFieldPath,
288+
rules: null,
289+
section: 'Schemas',
290+
};
291+
236292
export const METADATA_ENDPOINT: RecipeField = {
237293
name: 'metadata_endpoint',
238294
label: 'Custom Metadata Endpoint URL',

0 commit comments

Comments
 (0)