Skip to content

Commit

Permalink
Merge branch 'main' into add-to-CI-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-connors-3 committed Mar 1, 2023
2 parents 056a886 + 35fc756 commit 62e4af0
Show file tree
Hide file tree
Showing 5 changed files with 1,016 additions and 816 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: CI

on: pull_request
on:
- pull_request
- workflow_dispatch


jobs:
validate-json-schemas:
Expand Down
150 changes: 138 additions & 12 deletions schemas/dbt_project.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,24 @@
"$ref": "#/$defs/model_configs"
},
"on-run-end": {
"$ref": "#/$defs/array_of_strings"
"anyOf": [
{
"$ref": "#/$defs/array_of_strings"
},
{
"type": "string"
}
]
},
"on-run-start": {
"$ref": "#/$defs/array_of_strings"
"anyOf": [
{
"$ref": "#/$defs/array_of_strings"
},
{
"type": "string"
}
]
},
"packages-install-path": {
"type": "string"
Expand Down Expand Up @@ -95,6 +109,20 @@
}
]
},
"quoting": {
"type": "object",
"properties": {
"database": {
"$ref": "#/$defs/boolean_or_jinja_string"
},
"identifier": {
"$ref": "#/$defs/boolean_or_jinja_string"
},
"schema": {
"$ref": "#/$defs/boolean_or_jinja_string"
}
}
},
"require-dbt-version": {
"$ref": "#/$defs/string_or_array_of_strings"
},
Expand Down Expand Up @@ -134,11 +162,13 @@
"type": "string"
}
},
"empty_directory": {
"type": "null"
},
"boolean_or_jinja_string": {
"oneOf": [
{
"type": "string",
"pattern": "\\{\\{.*\\}\\}"
"$ref": "#/$defs/jinja_string"
},
{
"type": "boolean"
Expand All @@ -162,14 +192,25 @@
},
"additionalProperties": false
},
"jinja_string": {
"type": "string",
"pattern": "\\{\\{.*\\}\\}"
},
"label_configs": {
"title": "Label configs",
"type": "object",
"description": "Configurations specific to BigQuery adapter used to add labels and tags to tables & views created by dbt.",
"patternProperties": {
"^[a-z][a-z0-9_-]{0,63}$": {
"type": "string",
"pattern": "^[a-z0-9_-]{0,64}$"
"oneOf": [
{
"type": "string",
"pattern": "^[a-z0-9_-]{0,64}$"
},
{
"$ref": "#/$defs/jinja_string"
}
]
}
},
"additionalProperties": false
Expand Down Expand Up @@ -255,7 +296,14 @@
}
},
"additionalProperties": {
"$ref": "#/$defs/model_configs"
"oneOf" : [
{
"$ref": "#/$defs/model_configs"
},
{
"$ref": "#/$defs/empty_directory"
}
]
}
},
"persist_docs_config": {
Expand Down Expand Up @@ -298,22 +346,86 @@
},
"+tags": {
"$ref": "#/$defs/string_or_array_of_strings"
},
"+column_types": {
"type": "object",
"patternProperties": {
"": {
"type": "string"
}
}
},
"+full_refresh": {
"$ref": "#/$defs/boolean_or_jinja_string"
}
},
"additionalProperties": {
"$ref": "#/$defs/seed_configs"
"oneOf" : [
{
"$ref": "#/$defs/seed_configs"
},
{
"$ref": "#/$defs/empty_directory"
}
]
}
},
"snapshot_configs": {
"title": "Snapshot configs",
"type": "object",
"properties": {
"+alias": {
"type": "string"
},
"+check_cols": {
"$ref": "#/$defs/string_or_array_of_strings"
},
"+enabled": {
"$ref": "#/$defs/boolean_or_jinja_string"
},
"+grants": {
"type": "object"
},
"+persist_docs": {
"$ref": "#/$defs/persist_docs_config"
},
"+post-hook": {
"$ref": "#/$defs/array_of_strings"
},
"+pre-hook": {
"$ref": "#/$defs/array_of_strings"
},
"+quote_columns": {
"$ref": "#/$defs/boolean_or_jinja_string"
},
"+strategy": {
"type": "string"
},
"+tags": {
"$ref": "#/$defs/string_or_array_of_strings"
},
"+target_database": {
"type": "string"
},
"+target_schema": {
"type": "string"
},
"+unique_key": {
"$ref": "#/$defs/string_or_array_of_strings"
},
"+updated_at": {
"type": "string"
}
},
"additionalProperties": {
"$ref": "#/$defs/snapshot_configs"
"oneOf" : [
{
"$ref": "#/$defs/snapshot_configs"
},
{
"$ref": "#/$defs/empty_directory"
}
]
}
},
"source_configs": {
Expand All @@ -328,7 +440,14 @@
}
},
"additionalProperties": {
"$ref": "#/$defs/source_configs"
"oneOf" : [
{
"$ref": "#/$defs/source_configs"
},
{
"$ref": "#/$defs/empty_directory"
}
]
}
},
"string_or_array_of_strings": {
Expand Down Expand Up @@ -388,8 +507,15 @@
}
},
"additionalProperties": {
"$ref": "#/$defs/test_configs"
"oneOf" : [
{
"$ref": "#/$defs/test_configs"
},
{
"$ref": "#/$defs/empty_directory"
}
]
}
}
}
}
}
Loading

0 comments on commit 62e4af0

Please sign in to comment.