From 2deb43b18507ea04bbcc729312abbfe0528066d2 Mon Sep 17 00:00:00 2001 From: dave-connors-3 <73915542+dave-connors-3@users.noreply.github.com> Date: Mon, 13 Feb 2023 18:54:07 -0700 Subject: [PATCH] add enabled to seeds as config option (#34) * add enabled to seeds as config option * remove comment * remove + * adjust project yml file * add seed configs, sort json * add to standard yml entry configs as well * pesky comma * typo * Sort dbt_project.json --------- Co-authored-by: Joel Labes --- schemas/dbt_project.json | 53 +++++++++++++++++++++----------------- schemas/dbt_yml_files.json | 12 +++++++++ tests/dbt_project.yml | 4 +++ 3 files changed, 46 insertions(+), 23 deletions(-) diff --git a/schemas/dbt_project.json b/schemas/dbt_project.json index cfeb594..a5f2f09 100644 --- a/schemas/dbt_project.json +++ b/schemas/dbt_project.json @@ -145,6 +145,23 @@ } ] }, + "docs_config": { + "title": "Docs config", + "type": "object", + "description": "Configurations for the appearance of nodes in the dbt documentation.", + "properties": { + "node_color": { + "type": "string", + "description": "The color of the node on the DAG in the documentation. It must be an Hex code or a valid CSS color name.", + "pattern": "^(#[a-fA-F0-9]{3}|#[a-fA-F0-9]{6}|[^#][a-zA-Z]*)$" + }, + "show": { + "type": "boolean", + "default": true + } + }, + "additionalProperties": false + }, "label_configs": { "title": "Label configs", "type": "object", @@ -169,6 +186,9 @@ "+database": { "type": "string" }, + "+docs": { + "$ref": "#/$defs/docs_config" + }, "+enabled": { "$ref": "#/$defs/boolean_or_jinja_string" }, @@ -214,9 +234,7 @@ "ignore", "sync_all_columns" ] - }, - "+persist_docs": { "$ref": "#/$defs/persist_docs_config" }, @@ -234,9 +252,6 @@ }, "+tags": { "$ref": "#/$defs/string_or_array_of_strings" - }, - "+docs": { - "$ref": "#/$defs/docs_config" } }, "additionalProperties": { @@ -263,6 +278,15 @@ "title": "Seed configs", "type": "object", "properties": { + "+copy_grants": { + "$ref": "#/$defs/boolean_or_jinja_string" + }, + "+database": { + "type": "string" + }, + "+enabled": { + "$ref": "#/$defs/boolean_or_jinja_string" + }, "+persist_docs": { "$ref": "#/$defs/persist_docs_config" }, @@ -366,23 +390,6 @@ "additionalProperties": { "$ref": "#/$defs/test_configs" } - }, - "docs_config": { - "title": "Docs config", - "type": "object", - "description": "Configurations for the appearance of nodes in the dbt documentation.", - "properties": { - "node_color": { - "type": "string", - "description": "The color of the node on the DAG in the documentation. It must be an Hex code or a valid CSS color name.", - "pattern": "^(#[a-fA-F0-9]{3}|#[a-fA-F0-9]{6}|[^#][a-zA-Z]*)$" - }, - "show": { - "type": "boolean", - "default": true - } - }, - "additionalProperties": false } } -} +} \ No newline at end of file diff --git a/schemas/dbt_yml_files.json b/schemas/dbt_yml_files.json index 301d033..37b3de4 100644 --- a/schemas/dbt_yml_files.json +++ b/schemas/dbt_yml_files.json @@ -397,8 +397,20 @@ "column_types": { "type": "object" }, + "copy_grants": { + "$ref": "#/$defs/boolean_or_jinja_string" + }, + "database": { + "type": "string" + }, + "enabled": { + "$ref": "#/$defs/boolean_or_jinja_string" + }, "quote_columns": { "$ref": "#/$defs/boolean_or_jinja_string" + }, + "schema": { + "type": "string" } } }, diff --git a/tests/dbt_project.yml b/tests/dbt_project.yml index e5738fe..235747b 100644 --- a/tests/dbt_project.yml +++ b/tests/dbt_project.yml @@ -37,3 +37,7 @@ models: # Config indicated by + and applies to all files under models/example/ example: +materialized: view + +seeds: + test: + +enabled: false