dbt-labs / dbt-labs/dbt-jsonschema

Make table-level and column-level `meta` extensible for other tools

Open
#68 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
169
Forks
61
Avg merge
1m
Merged PRs (30d)
1

Description

## Motivation
Some tools which integrate with dbt defines their own custom schema under the `meta` property at table-level and column-level.
For instance, lightdash enables us to declare metrics like below.

https://docs.lightdash.com/guides/how-to-create-metrics

```yaml
# schema.yml
version: 2
models:
- name: "orders"
description: "A table of all orders."
columns:
- name: "status"
description: "Status of an order: ordered/processed/complete"
- name: "order_id"
meta:
metrics:
total_order_count:
type: count_distinct
- name: "order_value"
meta:
metrics:
total_sales:
type: sum
```

We define the `meta` property just as object. I don't have any good ideas to support such extensibility in JSON schema. But, if we make the JSON schema opened to other tools, that would be awesome.

https://github.com/dbt-labs/dbt-jsonschema/blob/main/schemas/dbt_yml_files.json#L680-L682

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.