Skip to content

Commit

Permalink
update placement of if else
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-connors-3 committed May 6, 2024
1 parent 1b5dc0c commit b5b72df
Showing 1 changed file with 83 additions and 58 deletions.
141 changes: 83 additions & 58 deletions schemas/latest/dbt_yml_files-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,90 +215,76 @@
"type",
"type_params"
],
"properties": {
"name": {
"type": "string",
"pattern": "(?!.*__).*^[a-z][a-z0-9_]*[a-z0-9]$"
},
"description": {
"type": "string"
},
"type": {
"enum": [
"SIMPLE",
"RATIO",
"CUMULATIVE",
"DERIVED",
"CONVERSION",
"simple",
"ratio",
"cumulative",
"derived",
"conversion"
]
},
"filter": {
"type": "string"
},
"group": {
"$ref": "#/$defs/group"
"if": {
"properties": {
"type": {
"enum": ["SIMPLE", "simple"]
}
}
},
"then": {
"properties": {
"type_params": {
"$ref": "#/$defs/simple_metric_type_params"
}
}
},
"else": {
"if": {
"properties": {
"type": {
"enum": ["derived", "DERIVED"]
}
}
},
"label": {
"type": "string"
"then": {
"properties": {
"type_params": {
"$ref": "#/$defs/derived_metric_type_params"
}
}
},
"type_params": {
"else": {
"if": {
"properties": {
"type": {
"enum": ["SIMPLE", "simple"]
"enum": ["cumulative", "CUMULATIVE"]
}
}
},
"then": {
"$ref": "#/$defs/simple_metric_type_params"
"properties": {
"type_params": {
"$ref": "#/$defs/cumulative_metric_type_params"
}
}
},
"else": {
"if": {
"properties": {
"type": {
"enum": ["derived", "DERIVED"]
"enum": ["conversion", "CONVERSION"]
}
}
},
"then": {
"$ref": "#/$defs/derived_metric_type_params"
"properties": {
"type_params": {
"$ref": "#/$defs/conversion_metric_type_params"
}
}
},
"else": {
"if": {
"properties": {
"type": {
"enum": ["cumulative", "CUMULATIVE"]
"enum": ["ratio", "RATIO"]
}
}
},
"then": {
"$ref": "#/$defs/cumulative_metric_type_params"
},
"else": {
"if": {
"properties": {
"type": {
"enum": ["conversion", "CONVERSION"]
}
}
},
"then": {
"$ref": "#/$defs/conversion_metric_type_params"
},
"else": {
"if": {
"properties": {
"type": {
"enum": ["ratio", "RATIO"]
}
}
},
"then": {
"properties": {
"type_params": {
"$ref": "#/$defs/ratio_metric_type_params"
}
}
Expand All @@ -307,6 +293,38 @@
}
}
},
"properties": {
"name": {
"type": "string",
"pattern": "(?!.*__).*^[a-z][a-z0-9_]*[a-z0-9]$"
},
"description": {
"type": "string"
},
"type": {
"enum": [
"SIMPLE",
"RATIO",
"CUMULATIVE",
"DERIVED",
"CONVERSION",
"simple",
"ratio",
"cumulative",
"derived",
"conversion"
]
},
"filter": {
"type": "string"
},
"group": {
"$ref": "#/$defs/group"
},
"label": {
"type": "string"
}
},
"additionalProperties": false
}
},
Expand Down Expand Up @@ -1447,7 +1465,14 @@
"type": "string"
},
"fill_nulls_with": {
"type": ["string", "integer"]
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"filter": {
"type": "string"
Expand Down

0 comments on commit b5b72df

Please sign in to comment.