mirror of
https://github.com/dbt-labs/dbt-core
synced 2025-12-20 08:41:29 +00:00
Compare commits
4 Commits
enable-pos
...
jsonschema
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83e4b10c35 | ||
|
|
7a26868e63 | ||
|
|
cac84a18c4 | ||
|
|
b123c78538 |
@@ -276,12 +276,45 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ColumnConfig": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"meta": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"tags": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/StringOrArrayOfStrings"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ColumnProperties": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"config": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ColumnConfig"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"constraints": {
|
||||
"type": [
|
||||
"array",
|
||||
@@ -320,7 +353,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"meta": true,
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -343,16 +375,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"tags": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/StringOrArrayOfStrings"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"type": [
|
||||
"array",
|
||||
@@ -2289,6 +2311,12 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"database": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"dbt_valid_to_current": {
|
||||
"type": [
|
||||
"string",
|
||||
@@ -2345,6 +2373,12 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"schema": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"snapshot_meta_column_names": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -2371,18 +2405,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"target_database": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"target_schema": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"unique_key": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -2456,16 +2478,6 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"freshness": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/FreshnessDefinition"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"loaded_at_field": {
|
||||
"type": [
|
||||
"string",
|
||||
@@ -2484,13 +2496,6 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -2524,16 +2529,6 @@
|
||||
"items": {
|
||||
"$ref": "#/definitions/Tables"
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/StringOrArrayOfStrings"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -2552,6 +2547,33 @@
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"freshness": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/FreshnessDefinition"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"tags": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/StringOrArrayOfStrings"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
@@ -2610,16 +2632,6 @@
|
||||
]
|
||||
},
|
||||
"external": true,
|
||||
"freshness": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/FreshnessDefinition"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"identifier": {
|
||||
"type": [
|
||||
"string",
|
||||
@@ -2644,13 +2656,6 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -2664,16 +2669,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"tags": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/StringOrArrayOfStrings"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tests": {
|
||||
"type": [
|
||||
"array",
|
||||
@@ -2689,11 +2684,44 @@
|
||||
"TablesConfig": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"event_time": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"freshness": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/FreshnessDefinition"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"tags": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/StringOrArrayOfStrings"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -83,8 +83,3 @@ models:
|
||||
docs:
|
||||
node_color: purple
|
||||
show: true
|
||||
|
||||
sources:
|
||||
- name: my_source
|
||||
tables:
|
||||
- name: my_table
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
sources:
|
||||
- name: my_source
|
||||
description: description
|
||||
database: raw
|
||||
schema: jaffle_shop
|
||||
loader: test
|
||||
loaded_at_field: column_name
|
||||
config:
|
||||
enabled: true
|
||||
event_time: column_name
|
||||
meta:
|
||||
test: 1
|
||||
freshness:
|
||||
warn_after:
|
||||
count: 1
|
||||
period: minute
|
||||
error_after:
|
||||
count: 2
|
||||
period: hour
|
||||
filter: "column_name = 1"
|
||||
|
||||
# # overrides: test
|
||||
|
||||
quoting:
|
||||
database: true
|
||||
schema: true
|
||||
identifier: true
|
||||
|
||||
tables:
|
||||
- name: my_table
|
||||
description: description
|
||||
identifier: table_identifier
|
||||
loaded_at_field: column_name
|
||||
tests:
|
||||
- not_null
|
||||
quoting:
|
||||
database: true
|
||||
schema: true
|
||||
identifier: true
|
||||
external:
|
||||
location: location
|
||||
file_format: file_format
|
||||
row_format: row_format
|
||||
tbl_properties: tbl_properties
|
||||
partitions:
|
||||
- name: column_name
|
||||
data_type: data_type
|
||||
description: description
|
||||
meta:
|
||||
test: 1
|
||||
additional_property: additional_value
|
||||
columns:
|
||||
- name: column_name
|
||||
description: description
|
||||
meta:
|
||||
test: 1
|
||||
quote: true
|
||||
tests:
|
||||
- not_null
|
||||
tags: ["tags"]
|
||||
config:
|
||||
enabled: true
|
||||
event_time: column_name
|
||||
meta:
|
||||
test: 1
|
||||
tags: ["tag"]
|
||||
freshness:
|
||||
warn_after:
|
||||
count: 1
|
||||
period: minute
|
||||
error_after:
|
||||
count: 2
|
||||
period: hour
|
||||
filter: "column_name = 1"
|
||||
@@ -562,18 +562,30 @@ class TestList:
|
||||
"json": {
|
||||
"config": {
|
||||
"enabled": True,
|
||||
"event_time": None,
|
||||
"freshness": None,
|
||||
"event_time": "column_name",
|
||||
"freshness": {
|
||||
"error_after": {
|
||||
"count": 2,
|
||||
"period": "hour",
|
||||
},
|
||||
"warn_after": {
|
||||
"count": 1,
|
||||
"period": "minute",
|
||||
},
|
||||
"filter": "column_name = 1",
|
||||
},
|
||||
"meta": {"test": 1},
|
||||
"tags": ["tag"],
|
||||
},
|
||||
"unique_id": "source.test.my_source.my_table",
|
||||
"original_file_path": normalize("models/schema.yml"),
|
||||
"original_file_path": normalize("models/sources.yml"),
|
||||
"package_name": "test",
|
||||
"name": "my_table",
|
||||
"source_name": "my_source",
|
||||
"resource_type": "source",
|
||||
"tags": [],
|
||||
},
|
||||
"path": self.dir("models/schema.yml"),
|
||||
"path": self.dir("models/sources.yml"),
|
||||
}
|
||||
# should we do this --select automatically for a user if if 'source' is
|
||||
# in the resource types and there is no '--select' or '--exclude'?
|
||||
|
||||
Reference in New Issue
Block a user