Skip to content

Commit

Permalink
feat(ingestion/dbt): Add database and schema filtering to dbt_cloud file
Browse files Browse the repository at this point in the history
  • Loading branch information
jackson-burke committed Jan 29, 2025
1 parent b262307 commit 43e2c93
Showing 1 changed file with 56 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,62 @@ export const NODE_DENY: RecipeField = {
section: 'Nodes',
};

const databaseAllowFieldPath = 'source.config.database_name_pattern.allow';
export const DATABASE_ALLOW: RecipeField = {
name: 'database_name_pattern.allow',
label: 'Allow Database Patterns',
tooltip:
'Only include specific dbt Databases by providing their name, or a Regular Expression (REGEX). If not provided, all Databases will be included.',
placeholder: 'database_name',
type: FieldType.LIST,
buttonLabel: 'Add pattern',
fieldPath: databaseAllowFieldPath,
rules: null,
section: 'Databases',
};

const databaseDenyFieldPath = 'source.config.database_name_pattern.deny';
export const DATABASE_DENY: RecipeField = {
name: 'database_name_pattern.deny',
label: 'Deny Database Patterns',
tooltip:
'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.',
placeholder: 'database_name',
type: FieldType.LIST,
buttonLabel: 'Add pattern',
fieldPath: databaseDenyFieldPath,
rules: null,
section: 'Databases',
};

const schemaAllowFieldPath = 'source.config.schema_name_pattern.allow';
export const SCHEMA_ALLOW: RecipeField = {
name: 'schema_name_pattern.allow',
label: 'Allow Schema Patterns',
tooltip:
'Only include specific dbt Schemas by providing their name, or a Regular Expression (REGEX). If not provided, all Schemas will be included.',
placeholder: 'schema_name',
type: FieldType.LIST,
buttonLabel: 'Add pattern',
fieldPath: schemaAllowFieldPath,
rules: null,
section: 'Schemas',
};

const schemaDenyFieldPath = 'source.config.schema_name_pattern.deny';
export const SCHEMA_DENY: RecipeField = {
name: 'schema_name_pattern.deny',
label: 'Deny Schema Patterns',
tooltip:
'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.',
placeholder: 'schema_name',
type: FieldType.LIST,
buttonLabel: 'Add pattern',
fieldPath: schemaDenyFieldPath,
rules: null,
section: 'Schemas',
};

export const METADATA_ENDPOINT: RecipeField = {
name: 'metadata_endpoint',
label: 'Custom Metadata Endpoint URL',
Expand Down

0 comments on commit 43e2c93

Please sign in to comment.