diff --git a/schemas/1.6/dbt_project-1.6.json b/schemas/1.6/dbt_project-1.6.json index 3207606..2f66c2f 100644 --- a/schemas/1.6/dbt_project-1.6.json +++ b/schemas/1.6/dbt_project-1.6.json @@ -164,6 +164,12 @@ "type": "string" } }, + "auto_refresh":{ + "$ref": "#/$defs/boolean_or_jinja_string" + }, + "backup":{ + "$ref": "#/$defs/boolean_or_jinja_string" + }, "contract": { "type": "object", "required": ["enforced"], @@ -238,6 +244,12 @@ "+alias": { "$ref": "#/$defs/alias" }, + "+auto_refresh":{ + "$ref": "#/$defs/auto_refresh" + }, + "+backup":{ + "$ref": "#/$defs/backup" + }, "+bind": { "$ref": "#/$defs/boolean_or_jinja_string", "default": false @@ -289,6 +301,9 @@ }, "+meta": { "$ref": "#/$defs/meta" + }, + "+on_configuration_change": { + "$ref": "#/$defs/on_configuration_change" }, "+on_schema_change": { "$ref": "#/$defs/on_schema_change" @@ -308,15 +323,27 @@ "+sql_header": { "$ref": "#/$defs/sql_header" }, + "+snowflake_warehouse":{ + "$ref": "#/$defs/snowflake_warehouse" + }, "+tags": { "$ref": "#/$defs/string_or_array_of_strings" }, + "+target_lag":{ + "$ref": "#/$defs/target_lag" + }, "+transient": { "$ref": "#/$defs/boolean_or_jinja_string" }, "alias": { "$ref": "#/$defs/alias" }, + "auto_refresh":{ + "$ref": "#/$defs/auto_refresh" + }, + "backup":{ + "$ref": "#/$defs/backup" + }, "bind": { "$ref": "#/$defs/boolean_or_jinja_string", "default": false @@ -368,6 +395,9 @@ }, "meta": { "$ref": "#/$defs/meta" + }, + "on_configuration_change": { + "$ref": "#/$defs/on_configuration_change" }, "on_schema_change": { "$ref": "#/$defs/on_schema_change" @@ -384,12 +414,18 @@ "schema": { "$ref": "#/$defs/schema" }, + "snowflake_warehouse": { + "$ref": "#/$defs/snowflake_warehouse" + }, "sql_header": { "$ref": "#/$defs/sql_header" }, "tags": { "$ref": "#/$defs/string_or_array_of_strings" }, + "target_lag": { + "$ref": "#/$defs/target_lag" + }, "transient": { "$ref": "#/$defs/boolean_or_jinja_string" } @@ -831,13 +867,17 @@ "materialized": { "type": "string" }, + "meta": { + "type": "object" + }, + "on_configuration_change": { + "type": "string", + "enum": ["apply", "continue", "fail"] + }, "on_schema_change": { "type": "string", "enum": ["append_new_columns", "fail", "ignore", "sync_all_columns"] }, - "meta": { - "type": "object" - }, "schema": { "type": ["string", "null"] }, @@ -855,12 +895,19 @@ "alias": { "type": "string" }, + "snowflake_warehouse": { + "type": "string" + }, "strategy": { "type": "string" }, "target_database": { "type": "string" }, + "target_lag": { + "type": "string", + "pattern": "^(?:downstream|\\d+\\s*(?:seconds|minutes|hours|days))$" + }, "target_schema": { "type": "string" }, diff --git a/schemas/1.6/dbt_yml_files-1.6.json b/schemas/1.6/dbt_yml_files-1.6.json index 34c360a..c7f0c71 100644 --- a/schemas/1.6/dbt_yml_files-1.6.json +++ b/schemas/1.6/dbt_yml_files-1.6.json @@ -1053,6 +1053,12 @@ "model_configs": { "type": "object", "properties": { + "auto_refresh": { + "$ref": "#/$defs/boolean_or_jinja_string" + }, + "backup": { + "$ref": "#/$defs/boolean_or_jinja_string" + }, "contract": { "type": "object", "properties": { @@ -1111,9 +1117,24 @@ }, "materialized": { "type": "string" + }, + "on_configuration_change": { + "type": "string", + "enum": ["apply", "continue", "fail"] + }, + "on_schema_change": { + "type": "string", + "enum": ["append_new_columns", "fail", "ignore", "sync_all_columns"] }, "sql_header": { "type": "string" + }, + "snowflake_warehouse":{ + "type": "string" + }, + "target_lag":{ + "type": "string", + "pattern": "^(?:downstream|\\d+\\s*(?:seconds|minutes|hours|days))$" } } }, diff --git a/tests/1.6/invalid/dbt_project.yml b/tests/1.6/invalid/dbt_project.yml index 6961709..a0f0475 100644 --- a/tests/1.6/invalid/dbt_project.yml +++ b/tests/1.6/invalid/dbt_project.yml @@ -42,7 +42,11 @@ models: +grants: no_numbers: 55 - + materialized_views: + materialized: materialized_view + config: + target_lag: 1 hour + snowflake_warehouse: 11 seeds: diff --git a/tests/1.6/valid/dbt_project.yml b/tests/1.6/valid/dbt_project.yml index 8f0de5c..cf2b88a 100644 --- a/tests/1.6/valid/dbt_project.yml +++ b/tests/1.6/valid/dbt_project.yml @@ -54,6 +54,12 @@ models: +grants: privilege: role privileges: ["select_user", "select_cruiser"] + materialized_views: + +materialized: materialized_view + +auto_refresh: true + +backup: '{{ target.name == "prod" }}' + +target_lag: 20 minutes + +snowflake_warehouse: my_warehouse test_bq: +labels: diff --git a/tests/1.6/valid/dbt_yml_files.yml b/tests/1.6/valid/dbt_yml_files.yml index 991a3b8..425c19c 100644 --- a/tests/1.6/valid/dbt_yml_files.yml +++ b/tests/1.6/valid/dbt_yml_files.yml @@ -57,7 +57,7 @@ models: - v: 1 config: alias: dim_customers - + - name: my_model_level_contract_model config: contract: @@ -70,7 +70,14 @@ models: - type: unique columns: [ color, date_day ] name: strange_uniqueness_requirement - + + - name: my_materialized_view + config: + materialized: materialized_view + auto_refresh: true + backup: '{{ target.name == "prod" }}' + target_lag: downstream + snowflake_warehouse: my_warehouse snapshots: - name: snapshot_name