Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated metric_input_measure to reflect correctly on what it can be #161

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 24 additions & 17 deletions schemas/latest/dbt_yml_files-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1753,29 +1753,36 @@
"additionalProperties": false
},
"metric_input_measure": {
"type": "object",
"properties": {
"name": {
"oneOf": [
{
"type": "string"
},
"fill_nulls_with": {
"anyOf": [
{
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
{
"type": "integer"
"fill_nulls_with": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"filter": {
"type": "string"
},
"join_to_timespine": {
"type": "boolean"
}
]
},
"filter": {
"type": "string"
},
"join_to_timespine": {
"type": "boolean"
},
"additionalProperties": false
}
},
"additionalProperties": false
]
},
"metric_input_schema": {
"type": "object",
Expand Down
9 changes: 9 additions & 0 deletions tests/latest/valid/dbt_yml_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,15 @@ metrics:
filter: |
{{ Dimension('customer__customer_type') }} = 'new'

- name: recurring_customer
description: Unique count of recurring customers.
label: Recurring Customers
type: simple
type_params:
measure: customers_with_orders
filter: |
{{ Dimension('customer__customer_type') }} = 'recurring'

- name: average_transaction_total_us
description: "The average total for each transaction in the US"
label: Transaction Total Average US
Expand Down
Loading