Skip to content

Commit

Permalink
Merge pull request #161 from dbt-labs/will/fix-metric-bug
Browse files Browse the repository at this point in the history
Updated metric_input_measure to reflect correctly on what it can be
  • Loading branch information
dave-connors-3 authored Sep 11, 2024
2 parents 9cac6e6 + 190685b commit 104fe9e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
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

0 comments on commit 104fe9e

Please sign in to comment.