Skip to content

Commit

Permalink
add enabled to seeds as config option (#34)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
dave-connors-3 and joellabes authored Feb 14, 2023
1 parent c431850 commit 2deb43b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 23 deletions.
53 changes: 30 additions & 23 deletions schemas/dbt_project.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -169,6 +186,9 @@
"+database": {
"type": "string"
},
"+docs": {
"$ref": "#/$defs/docs_config"
},
"+enabled": {
"$ref": "#/$defs/boolean_or_jinja_string"
},
Expand Down Expand Up @@ -214,9 +234,7 @@
"ignore",
"sync_all_columns"
]

},

"+persist_docs": {
"$ref": "#/$defs/persist_docs_config"
},
Expand All @@ -234,9 +252,6 @@
},
"+tags": {
"$ref": "#/$defs/string_or_array_of_strings"
},
"+docs": {
"$ref": "#/$defs/docs_config"
}
},
"additionalProperties": {
Expand All @@ -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"
},
Expand Down Expand Up @@ -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
}
}
}
}
12 changes: 12 additions & 0 deletions schemas/dbt_yml_files.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ models:
# Config indicated by + and applies to all files under models/example/
example:
+materialized: view

seeds:
test:
+enabled: false

0 comments on commit 2deb43b

Please sign in to comment.