elementary.json_schema
Allows validating that a string column matches a given JSON schema. The test expects a JSON schema as input,
defined according to the JSON schema standard, defined in YAML format (see an example below).
This test along with the relevant JSON schema can be auto-generated (see details below).
generate_json_schema_test
macro in order to auto-generate the JSON schema for a given
column using existing data.
Example usage:
generate_json_schema_test
macro relies on a 3rd-party python library called genson
. If you are using
BigQuery, you will need to pre-install this library in your Dataproc cluster (See dbt’s documentation on Python models
for more details)