dbt-labs / dbt-jsonschema

Apache License 2.0
109 stars 40 forks source link

seeds still support only tests and not data_tests in latest version #142

Open illia-yurtsiv-proxet opened 1 month ago

illia-yurtsiv-proxet commented 1 month ago
// dbt-labs/dbt-jsonschema/main/schemas/latest/dbt_yml_files-latest.json
    "seeds": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/column_properties"
            }
          },
          "config": {
            "type": "object",
            "properties": {
              "column_types": {
                "type": "object"
              },
              "copy_grants": {
                "$ref": "#/$defs/boolean_or_jinja_string"
              },
              "data_tests": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/data_tests"
                }
              },
              "database": {
                "type": "string"
              },
              "enabled": {
                "$ref": "#/$defs/boolean_or_jinja_string"
              },
              "grants": {
                "$ref": "#/$defs/grants"
              },
              "quote_columns": {
                "$ref": "#/$defs/boolean_or_jinja_string"
              },
              "schema": {
                "type": "string"
              }
            }
          },
          "docs": {
            "$ref": "#/$defs/docs_config"
          },
          "group": {
            "$ref": "#/$defs/group"
          },
          "tests": { // Here, on the root level
            "type": "array",
            "items": {
              "$ref": "#/$defs/data_tests"
            }
          }
        },
        "additionalProperties": false
      }
    },
benjaminbauer commented 3 weeks ago

Same for sources:

sources:
  - name: name
    tables:
      - name: le_table
        columns:
          - name: id
        data_tests:
          - elementary.schema_changes_from_baseline