Created
March 31, 2026 22:01
-
-
Save camsaul/f0875d9308eba98a56e510892be22907 to your computer and use it in GitHub Desktop.
MBQL 5 JSON Schema (First pass)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.query", | |
| "definitions" : { | |
| "metabase.lib.schema.metadata.stage" : { | |
| "description" : "Metadata about the columns returned by a particular stage of a pMBQL query. For example a single-stage native query\n like\n\n {:database 1\n :lib/type :mbql/query\n :stages [{:lib/type :mbql.stage/mbql\n :native \"SELECT id, name FROM VENUES;\"}]}\n\n might have stage metadata like\n\n {:columns [{:name \"id\", :base-type :type/Integer}\n {:name \"name\", :base-type :type/Text}]}\n\n associated with the query's lone stage.\n\n At some point in the near future we will hopefully attach this metadata directly to each stage in a query, so a\n multi-stage query will have `:lib/stage-metadata` for each stage. The main goal is to facilitate things like\n returning lists of visible or filterable columns for a given stage of a query. This is TBD, see #28717 for a WIP\n implementation of this idea.\n\n This is the same format as the results metadata returned with QP results in `data.results_metadata`. The `:columns`\n portion of this (`data.results_metadata.columns`) is also saved as `Card.result_metadata` for Saved Questions.\n\n Note that queries currently actually come back with both `data.results_metadata` AND `data.cols`; it looks like the\n Frontend actually *merges* these together -- see `applyMetadataDiff` in\n `frontend/src/metabase/query_builder/selectors.js` -- but this is ridiculous. Let's try to merge anything missing in\n `results_metadata` into `cols` going forward so things don't need to be manually merged in the future.", | |
| "type" : "object", | |
| "properties" : { | |
| "columns" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.column" | |
| } | |
| }, | |
| "lib/type" : { | |
| "default" : "metadata/results", | |
| "const" : "metadata/results" | |
| } | |
| }, | |
| "required" : [ "lib/type", "columns" ] | |
| }, | |
| "metabase.lib.schema.literal.integer" : { | |
| "anyOf" : [ { | |
| "type" : "integer" | |
| }, { } ] | |
| }, | |
| "metabase.lib.schema.filters" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" | |
| }, | |
| "minItems" : 1 | |
| }, | |
| "mbql.clause.split-part" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "split-part" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| }, { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.positive-integer-or-numeric-expression" | |
| } ] | |
| }, | |
| "mbql.clause.trim" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "trim" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "mbql.clause.quarter-name" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "quarter-name" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.integer" | |
| } ] | |
| }, | |
| "metabase.lib.schema..stage.initial" : { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "properties" : { } | |
| }, { } ] | |
| }, | |
| "metabase.lib.schema.stages" : { | |
| "allOf" : [ { | |
| "default" : [ ], | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.stage" | |
| }, | |
| "minItems" : 1 | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema..stages.valid-refs" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata..column.validate-for-source-previous-stage" : { | |
| "allOf" : [ ] | |
| }, | |
| "metabase.lib.schema.common.options" : { | |
| "default" : { }, | |
| "type" : "object", | |
| "properties" : { | |
| "base-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/uuid" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, | |
| "name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| }, | |
| "required" : [ "lib/uuid" ] | |
| }, | |
| "metabase.lib.schema.template-tag..field-filter.options" : { | |
| "type" : "object", | |
| "properties" : { } | |
| }, | |
| "mbql.clause.float" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "float" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter.variable" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "variable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter..variable.target" | |
| } ] | |
| }, | |
| "mbql.clause.ends-with" : { }, | |
| "mbql.clause.desc" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "desc" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| } ] | |
| }, | |
| "metabase.lib.metadata.protocols.metadata-provider" : { | |
| "description" : "Schema for something that satisfies the [[metabase.lib.metadata.protocols/MetadataProvider]] protocol." | |
| }, | |
| "mbql.clause.-" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.plus-minus-temporal-interval-schema" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.plus-minus-numeric-schema" | |
| }, { | |
| "anyOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.plus-minus-numeric-schema" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.temporal-difference-schema" | |
| } ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata..column.remapping.internal" : { | |
| "description" : "Internal remapping (FieldValues) for a column. From [[metabase.warehouse-schema.models.dimension]] with `type =\n internal` and the [[metabase.warehouse-schema.models.field-values]] associated with a `Field` in the application\n database. See [[metabase.query-processor.middleware.add-remaps]] for what this means.", | |
| "type" : "object", | |
| "properties" : { | |
| "human-readable-values" : { | |
| "type" : "array", | |
| "items" : { } | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.dimension" | |
| }, | |
| "lib/type" : { | |
| "const" : "metadata.column.remapping/internal" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "values" : { | |
| "type" : "array", | |
| "items" : { } | |
| } | |
| }, | |
| "required" : [ "lib/type", "id", "name", "values", "human-readable-values" ] | |
| }, | |
| "metabase.lib.schema.metadata.fingerprint..fingerprint.type-specific" : { | |
| "description" : "Schema for type-specific fingerprint information.", | |
| "allOf" : [ { | |
| "type" : "object", | |
| "additionalProperties" : { | |
| "type" : "object", | |
| "properties" : { } | |
| } | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "type/DateTime" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.temporal" | |
| }, | |
| "type/Number" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.number" | |
| }, | |
| "type/Text" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.text" | |
| } | |
| } | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter..dimension.target" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-expression-ref" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.template-tag" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref" | |
| } ] | |
| }, | |
| "metabase.lib.schema.ref.ref" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" | |
| }, | |
| "mbql.clause._GT__EQ_" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : ">=" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter..target.legacy-expression-ref" : { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression" | |
| }, | |
| "metabase.lib.schema.template-tag..value.common" : { | |
| "type" : "object", | |
| "properties" : { | |
| "default" : { }, | |
| "display-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name" | |
| }, | |
| "required" : { | |
| "type" : "boolean" | |
| } | |
| }, | |
| "required" : [ "name", "display-name" ] | |
| }, | |
| "metabase.lib.schema.temporal-bucketing..unit.date-time.interval" : { | |
| "type" : "string", | |
| "enum" : [ "day", "hour", "millisecond", "minute", "month", "quarter", "second", "week", "year" ] | |
| }, | |
| "metabase.lib.schema.common.semantic-or-relation-type" : { | |
| "description" : "valid semantic or relation type", | |
| "type" : "string" | |
| }, | |
| "mbql.clause.abs" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "abs" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "metabase.lib.schema.id.dimension" : { | |
| "description" : "Valid Dimension ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "mbql.clause.distinct" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "distinct" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.aggregation..distinct.arg" | |
| } ] | |
| }, | |
| "metabase.lib.schema.ref..field.literal.options" : { | |
| "allOf" : [ { | |
| "default" : { }, | |
| "type" : "object", | |
| "properties" : { | |
| "binning" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" | |
| }, | |
| "inherited-temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "source-field-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "base-type" : { | |
| "type" : "string" | |
| }, | |
| "lib/uuid" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, | |
| "name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-effective-type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, | |
| "source-field" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, | |
| "join-alias" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" | |
| }, | |
| "lib/original-binning" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" | |
| }, | |
| "temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, | |
| "source-field-join-alias" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "original-temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| } | |
| }, | |
| "required" : [ "lib/uuid", "base-type" ] | |
| }, { | |
| "allOf" : [ ] | |
| } ] | |
| }, | |
| "mbql.clause.count" : { }, | |
| "metabase.lib.schema.parameter.id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "metabase.lib.schema.actions.row" : { | |
| "type" : "object", | |
| "additionalProperties" : { } | |
| }, | |
| "metabase.lib.schema.id.transform" : { | |
| "description" : "Valid Transform ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "metabase.lib.schema..stage.valid-refs" : { }, | |
| "metabase.lib.schema.expression.orderable" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" | |
| } ] | |
| }, | |
| "mbql.clause.length" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "length" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "mbql.clause.interval" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "interval" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "type" : "integer" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" | |
| } ] | |
| }, | |
| "metabase.lib.schema.aggregation..percentile.percentile" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| }, | |
| "metabase.legacy-mbql.schema.Reference" : { | |
| "description" : "Schema for any type of valid Field clause, or for an indexed reference to an aggregation clause.", | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.aggregation" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.expression" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" | |
| } ] | |
| }, | |
| "mbql.clause.median" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "median" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "mbql.clause.coalesce" : { }, | |
| "metabase.lib.schema.deduplicate-refs-ignoring-source-field-name-when-possible" : { }, | |
| "metabase.lib.schema.common.kebab-cased-map" : { }, | |
| "metabase.lib.schema.expression.expressions" : { | |
| "description" : "The `:expressions` definition map as found as a top-level key in an MBQL stage.", | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression..expression.definition" | |
| }, | |
| "minItems" : 1 | |
| }, | |
| "mbql.clause.log" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "log" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "mbql.clause.get-hour" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "get-hour" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| } ] | |
| }, | |
| "mbql.clause._SLASH_" : { }, | |
| "mbql.clause.concat" : { }, | |
| "metabase.lib.schema.expression.temporal..relative-datetime.unit" : { | |
| "anyOf" : [ { | |
| "const" : "default" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata..column.validate-for-source-expressions" : { | |
| "allOf" : [ ] | |
| }, | |
| "mbql.clause.sum" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "sum" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "metabase.legacy-mbql.schema.require-base-type-for-field-name" : { | |
| "description" : "Fields using names rather than integer IDs are required to specify `:base-type`." | |
| }, | |
| "metabase.lib.schema.expression.window..offset.n" : { | |
| "type" : "integer" | |
| }, | |
| "mbql.clause.inside" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "inside" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| } ] | |
| }, | |
| "mbql.clause._LT_" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "<" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| } ] | |
| }, | |
| "mbql.clause.upper" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "upper" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "mbql.clause.segment" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "segment" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.segment" | |
| } ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter..variable.target" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.template-tag" | |
| } ] | |
| }, | |
| "metabase.lib.schema.literal..string.zone-offset" : { | |
| "type" : "string", | |
| "pattern" : "(?:Z|(?:[+-]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?))" | |
| }, | |
| "mbql.clause.not-null" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "not-null" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" | |
| } ] | |
| }, | |
| "mbql.clause.today" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "today" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter.target" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.dimension" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.variable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.text-tag" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter..target.legacy-field-ref" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata..column.validate-for-source-table-defaults" : { | |
| "allOf" : [ ] | |
| }, | |
| "metabase.lib.schema.expression.temporal..temporal-extract.unit" : { | |
| "type" : "string", | |
| "enum" : [ "year-of-era", "quarter-of-year", "month-of-year", "week-of-year-iso", "week-of-year-us", "week-of-year-instance", "day-of-month", "day-of-week", "day-of-week-iso", "hour-of-day", "minute-of-hour", "second-of-minute" ] | |
| }, | |
| "metabase.lib.schema.fields" : { | |
| "allOf" : [ { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.ref.ref" | |
| }, | |
| "minItems" : 1 | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.util.distinct-mbql-clauses" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.deduplicate-refs-ignoring-source-field-name-when-possible" | |
| } ] | |
| }, | |
| "metabase.lib.schema.template-tag..raw-value.type" : { | |
| "type" : "string", | |
| "enum" : [ "date", "number", "boolean", "text" ] | |
| }, | |
| "metabase.lib.schema.expression..expression.definition" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" | |
| }, | |
| "mbql.clause.cum-count" : { }, | |
| "metabase.lib.schema.parameter.parameter" : { | |
| "description" : "Schema for the *value* of a parameter (e.g. a Dashboard parameter or a native query template tag) as passed in as\n part of the `:parameters` list in a query.\n\n Note that this is different from the parameter declarations that are saved as part of Dashboards and Cards; for THAT\n schema refer to `:metabase.parameters.schema/parameter`.", | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "default" : { }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.id" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "required" : { }, | |
| "slug" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "target" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.target" | |
| }, | |
| "type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.type" | |
| }, | |
| "value" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter..parameter.value" | |
| } | |
| }, | |
| "required" : [ "type" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.kebab-cased-map" | |
| } ] | |
| }, | |
| "metabase.lib.schema.id.measure" : { | |
| "description" : "Valid Measure ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "mbql.clause.expression" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "expression" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.ref..expression.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.common.uuid" : { | |
| "type" : "string", | |
| "minLength" : 36, | |
| "maxLength" : 36 | |
| }, | |
| "metabase.lib.schema.ref..field.id" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "field" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata.desired-column-alias" : { | |
| "description" : "Name we should use as a column alias for a column in this stage of a query. The desired column alias in stage N\n becomes the source column alias in stage N+1. The right-hand side (RHS) in\n\n SELECT lhs AS rhs", | |
| "type" : "string" | |
| }, | |
| "mbql.clause.day-name" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "day-name" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.integer" | |
| } ] | |
| }, | |
| "metabase.lib.schema..stage.common" : { | |
| "type" : "object", | |
| "properties" : { | |
| "lib/stage-metadata" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.stage" | |
| }, | |
| "parameters" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters" | |
| } | |
| } | |
| }, | |
| "mbql.clause._STAR_" : { }, | |
| "metabase.lib.schema.id.field" : { | |
| "description" : "Valid Field ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "metabase.lib.schema.expression.temporal.datetime-diff-unit" : { | |
| "type" : "string", | |
| "enum" : [ "day", "week", "month", "quarter", "year", "second", "minute", "hour" ] | |
| }, | |
| "mbql.clause.domain" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "domain" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "mbql.clause.is-null" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "is-null" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter..template-tag.tag-name" : { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| } | |
| }, | |
| "required" : [ "id" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| } ] | |
| }, | |
| "mbql.clause.contains" : { }, | |
| "metabase.lib.schema..stage.additional" : { | |
| "oneOf" : [ { }, { } ] | |
| }, | |
| "metabase.lib.schema.template-tag.template-tag-map" : { | |
| "allOf" : [ { | |
| "type" : "object", | |
| "additionalProperties" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.template-tag" | |
| } | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..template-tag-map.validate-names" | |
| } ] | |
| }, | |
| "metabase.lib.schema.template-tag.source-filter" : { | |
| "description" : "Schema for a single source-filter applied to a table template tag.", | |
| "type" : "object", | |
| "properties" : { | |
| "field-id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, | |
| "op" : { | |
| "type" : "string", | |
| "enum" : [ "<=", ">", ">=", "!=", "=", "<" ] | |
| }, | |
| "value" : { } | |
| }, | |
| "required" : [ "field-id", "op", "value" ] | |
| }, | |
| "mbql.clause.ceil" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "ceil" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "metabase.lib.schema.id.dashboard" : { | |
| "description" : "Valid Dashboard ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "mbql.clause.get-day" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "get-day" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata.source-column-alias" : { | |
| "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", | |
| "type" : "string" | |
| }, | |
| "mbql.clause.between" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "between" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| } ] | |
| }, | |
| "mbql.clause.not-empty" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "not-empty" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" | |
| } ] | |
| }, | |
| "metabase.lib.schema.temporal-bucketing..unit.date-time" : { | |
| "type" : "string", | |
| "enum" : [ "millisecond", "second", "minute", "hour", "day", "week", "month", "quarter", "year", "second-of-minute", "minute-of-hour", "hour-of-day", "day-of-week", "day-of-month", "day-of-year", "week-of-year", "month-of-year", "quarter-of-year", "year-of-era" ] | |
| }, | |
| "mbql.clause.power" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "power" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "metabase.lib.schema.id.table" : { | |
| "description" : "Valid Table ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "mbql.clause.absolute-datetime" : { }, | |
| "metabase.lib.schema.metadata.original-name" : { | |
| "description" : "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names.", | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metabase.lib.schema.ref..field.options" : { | |
| "allOf" : [ { | |
| "default" : { }, | |
| "type" : "object", | |
| "properties" : { | |
| "binning" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" | |
| }, | |
| "inherited-temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "source-field-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "base-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/uuid" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, | |
| "name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-effective-type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, | |
| "source-field" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, | |
| "join-alias" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" | |
| }, | |
| "lib/original-binning" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" | |
| }, | |
| "temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, | |
| "source-field-join-alias" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "original-temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| } | |
| }, | |
| "required" : [ "lib/uuid" ] | |
| }, { | |
| "allOf" : [ ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.temporal-bucketing.unit" : { | |
| "type" : "string", | |
| "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "default", "hour", "hour-of-day", "millisecond", "minute", "minute-of-hour", "month", "month-of-year", "quarter", "quarter-of-year", "second", "second-of-minute", "week", "week-of-year", "year", "year-of-era" ] | |
| }, | |
| "mbql.clause.avg" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "avg" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "metabase.lib.schema.literal.jvm.float" : { }, | |
| "mbql.clause.replace" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "replace" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| }, { | |
| "type" : "string" | |
| }, { | |
| "type" : "string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.expression.arithmetic.plus-minus-temporal-interval-schema" : { | |
| "allOf" : [ ] | |
| }, | |
| "metabase.lib.schema.join.join" : { | |
| "allOf" : [ { | |
| "default" : { }, | |
| "type" : "object", | |
| "properties" : { | |
| "alias" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" | |
| }, | |
| "conditions" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.conditions" | |
| }, | |
| "fields" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.fields" | |
| }, | |
| "lib/type" : { | |
| "default" : "mbql/join", | |
| "const" : "mbql/join" | |
| }, | |
| "stages" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.stages" | |
| }, | |
| "strategy" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.strategy" | |
| } | |
| }, | |
| "required" : [ "lib/type", "stages", "conditions", "alias" ] | |
| }, { | |
| "allOf" : [ ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.validate-field-aliases-match-join-alias" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata.fingerprint..fingerprint.number" : { | |
| "description" : "Schema for fingerprint information for Fields deriving from `:type/Number`.", | |
| "type" : "object", | |
| "properties" : { | |
| "avg" : { | |
| "oneOf" : [ { | |
| "type" : "number" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "max" : { | |
| "oneOf" : [ { | |
| "type" : "number" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "min" : { | |
| "oneOf" : [ { | |
| "type" : "number" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "q1" : { | |
| "oneOf" : [ { | |
| "type" : "number" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "q3" : { | |
| "oneOf" : [ { | |
| "type" : "number" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "sd" : { | |
| "oneOf" : [ { | |
| "type" : "number" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| } | |
| }, | |
| "mbql.clause.convert-timezone" : { }, | |
| "metabase.lib.schema.join.joins" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.join" | |
| }, | |
| "minItems" : 1 | |
| }, | |
| "mbql.clause.metric" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "metric" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.card" | |
| } ] | |
| }, | |
| "metabase.legacy-mbql.schema.aggregation" : { | |
| "description" : "schema for a valid MBQL 4 :aggregation clause", | |
| "allOf" : [ ] | |
| }, | |
| "metabase.lib.schema.metadata..column.validate-for-source-native" : { | |
| "allOf" : [ ] | |
| }, | |
| "metabase.lib.schema.parameter..parameter.value" : { }, | |
| "metabase.lib.schema.info.context" : { | |
| "description" : "Schema for `info.context`; used for informational purposes to record how a query was executed.", | |
| "type" : "string", | |
| "enum" : [ "action", "ad-hoc", "agent", "cache-refresh", "collection", "map-tiles", "pulse", "dashboard-subscription", "dashboard", "question", "csv-download", "xlsx-download", "json-download", "public-dashboard", "public-question", "public-csv-download", "public-xlsx-download", "public-json-download", "embedded-dashboard", "embedded-question", "embedded-csv-download", "embedded-xlsx-download", "embedded-json-download", "table-grid", "transform-inspector", "slackbot" ] | |
| }, | |
| "metabase.lib.schema.aggregation.aggregations" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.aggregation.aggregation" | |
| }, | |
| "minItems" : 1 | |
| }, | |
| "metabase.legacy-mbql.schema.ExpressionName" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "metabase.lib.schema.id.pulse" : { | |
| "description" : "Valid Pulse ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "mbql.clause.and" : { }, | |
| "metabase.lib.schema.util.unique-uuids" : { }, | |
| "mbql.clause.starts-with" : { }, | |
| "metabase.lib.schema.template-tag.id" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "format" : "uuid" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.info.hash" : { | |
| "type" : "string", | |
| "format" : "byte" | |
| }, | |
| "mbql.clause._PLUS_" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.plus-minus-temporal-interval-schema" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.arithmetic.plus-minus-numeric-schema" | |
| } ] | |
| }, | |
| "metabase.lib.schema.expression.string" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" | |
| } ] | |
| }, | |
| "metabase.lib.schema.order-by.order-bys" : { | |
| "allOf" : [ { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.order-by.order-by" | |
| }, | |
| "minItems" : 1 | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.util.distinct-mbql-clauses" | |
| } ] | |
| }, | |
| "mbql.clause.asc" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "asc" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| } ] | |
| }, | |
| "mbql.clause.or" : { }, | |
| "mbql.clause.substring" : { }, | |
| "metabase.legacy-mbql.schema.FieldRefOptions" : { | |
| "description" : "Options for an MBQL 4 `:field` ref are the same as MBQL 5, except that `:lib/uuid` is not required and it cannot be\n empty.", | |
| "oneOf" : [ { | |
| "allOf" : [ { | |
| "default" : { }, | |
| "type" : "object", | |
| "properties" : { | |
| "binning" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" | |
| }, | |
| "inherited-temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "source-field-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "base-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/uuid" : { | |
| "type" : "string", | |
| "minLength" : 36, | |
| "maxLength" : 36 | |
| }, | |
| "name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-effective-type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, | |
| "source-field" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, | |
| "join-alias" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" | |
| }, | |
| "lib/original-binning" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" | |
| }, | |
| "temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, | |
| "source-field-join-alias" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "original-temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| } | |
| } | |
| }, { | |
| "allOf" : [ ] | |
| } ] | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "mbql.clause.month-name" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "month-name" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.integer" | |
| } ] | |
| }, | |
| "metabase.lib.schema..stage.native" : { | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "collection" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "lib/stage-metadata" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.stage" | |
| }, | |
| "lib/type" : { | |
| "const" : "mbql.stage/native" | |
| }, | |
| "native" : { }, | |
| "parameters" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters" | |
| }, | |
| "params" : { | |
| "oneOf" : [ { | |
| "type" : "array", | |
| "items" : { | |
| "anyOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" | |
| }, { } ] | |
| } | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "query-permissions/referenced-card-ids" : { | |
| "oneOf" : [ { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.card" | |
| }, | |
| "uniqueItems" : true | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "template-tags" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.template-tag-map" | |
| } | |
| }, | |
| "required" : [ "lib/type" ] | |
| }, { | |
| "allOf" : [ ] | |
| } ] | |
| }, | |
| "mbql.clause.datetime-diff" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "datetime-diff" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.datetime-diff-unit" | |
| } ] | |
| }, | |
| "mbql.clause.var" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "var" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata..column.visibility-type" : { | |
| "type" : "string", | |
| "enum" : [ "retired", "sensitive", "normal", "hidden", "details-only" ] | |
| }, | |
| "metabase.lib.schema.join.condition" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" | |
| }, | |
| "metabase.lib.schema.literal.time" : { | |
| "description" : "time literal", | |
| "anyOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.time" | |
| }, { }, { } ] | |
| }, | |
| "metabase.lib.schema.parameter.dimension" : { }, | |
| "metabase.lib.schema.join.alias" : { | |
| "description" : "The name used to alias the joined table or query. This is usually generated automatically and generally looks like\n `table__via__field`. You can specify this yourself if you need to reference a joined field with a `:join-alias` in\n the options.", | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "metabase.lib.schema.id.user" : { | |
| "description" : "Valid User ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "mbql.clause.collate" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "collate" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| }, { | |
| "type" : "string" | |
| } ] | |
| }, | |
| "mbql.clause._LT__EQ_" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "<=" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| } ] | |
| }, | |
| "mbql.clause.max" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "max" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| } ] | |
| }, | |
| "mbql.clause.datetime-subtract" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "datetime-subtract" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| }, { | |
| "type" : "integer" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" | |
| } ] | |
| }, | |
| "mbql.clause.path" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "path" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.aggregation.aggregation" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" | |
| }, | |
| "metabase.lib.schema.binning.bin-width" : { | |
| "description" : "Bin width (size of each bin).", | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.positive-number" | |
| }, | |
| "mbql.clause.not-in" : { }, | |
| "metabase.lib.schema.expression.equality-comparable" : { | |
| "oneOf" : [ { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" | |
| } ] | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metabase.legacy-mbql.schema.ExpressionRefOptions" : { | |
| "description" : "Options for a legacy `:expression` ref in MBQL 4 are the same as in MBQL 5, except that `:lib/uuid` is optional and\n it cannot be empty.", | |
| "default" : { }, | |
| "type" : "object", | |
| "properties" : { | |
| "base-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/uuid" : { | |
| "type" : "string", | |
| "minLength" : 36, | |
| "maxLength" : 36 | |
| }, | |
| "name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| } | |
| } | |
| }, | |
| "metabase.lib.schema.parameter.text-tag" : { | |
| "description" : "A :text-tag parameter :target applies to parameterized text cards in viz settings", | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "text-tag" | |
| }, { | |
| "type" : "string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.common.positive-number" : { }, | |
| "metabase.lib.schema.expression.positive-integer-or-numeric-expression" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.integer" | |
| }, | |
| "mbql.clause.round" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "round" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata..column.validate-for-source-card" : { | |
| "allOf" : [ ] | |
| }, | |
| "metabase.lib.schema.expression.arithmetic..args.numbers" : { }, | |
| "mbql.clause.in" : { }, | |
| "metabase.lib.schema.metadata..column.validate-for-source-aggregations" : { | |
| "allOf" : [ ] | |
| }, | |
| "metabase.lib.schema.template-tag.widget-type" : { | |
| "description" : "Schema for valid values of `:widget-type` for a `:metabase.lib.schema.template-tag/field-filter` template tag.", | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.widget-type" | |
| }, | |
| "metabase.lib.schema.template-tag.field-filter" : { | |
| "type" : "object", | |
| "properties" : { | |
| "display-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name" | |
| }, | |
| "required" : { | |
| "type" : "boolean" | |
| }, | |
| "type" : { | |
| "const" : "dimension" | |
| }, | |
| "alias" : { | |
| "type" : "string" | |
| }, | |
| "options" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..field-filter.options" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "dimension" : { | |
| "$ref" : "#/components/schemas/mbql.clause.field" | |
| }, | |
| "default" : { }, | |
| "widget-type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.widget-type" | |
| } | |
| }, | |
| "required" : [ "name", "display-name", "type", "widget-type" ] | |
| }, | |
| "mbql.clause.get-minute" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "get-minute" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| } ] | |
| }, | |
| "mbql.clause.get-year" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "get-year" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| } ] | |
| }, | |
| "metabase.lib.schema.expression.temporal..absolute-datetime.base-type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, | |
| "metabase.lib.schema..stages.valid-refs" : { }, | |
| "metabase.lib.schema.breakouts" : { | |
| "allOf" : [ { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.breakout" | |
| }, | |
| "minItems" : 1 | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.util.distinct-mbql-clauses" | |
| } ] | |
| }, | |
| "mbql.clause.field" : { | |
| "allOf" : [ { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "field" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.options" | |
| }, { | |
| "anyOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, { | |
| "type" : "string" | |
| } ] | |
| } ] | |
| }, { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.id" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.literal" | |
| } ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.id.snippet" : { | |
| "description" : "Valid Snippet ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "metabase.lib.schema.join.validate-field-aliases-match-join-alias" : { }, | |
| "metabase.lib.schema.ref..field.literal" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "field" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.ref..field.literal.options" | |
| }, { | |
| "type" : "string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata..column.source" : { | |
| "description" : "`:lib/source` -- where a column came from with respect to the current stage.\n\n Traditionally, `:lib/source` meant something slightly different -- it denoted what part of the current stage a\n column came from, and thus included two additional options -- `:source/fields`, for columns used by `:fields`, and\n `:source/breakouts`, for columns used in `:breakout`. This was not really useful information and made `:lib/source`\n itself useless for determining if a column was 'inherited' or not (i.e., whether it came from a previous stage,\n source card, or a join, and should get field name refs instead of field ID refs --\n see [[metabase.lib.field.util/inherited-column?]]).", | |
| "type" : "string", | |
| "enum" : [ "source/card", "source/native", "source/previous-stage", "source/table-defaults", "source/aggregations", "source/joins", "source/expressions", "source/implicitly-joinable" ] | |
| }, | |
| "metabase.lib.schema..stage.mbql" : { | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "source-card" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.card" | |
| }, | |
| "lib/type" : { | |
| "const" : "mbql.stage/mbql" | |
| }, | |
| "lib/stage-metadata" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.stage" | |
| }, | |
| "breakout" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.breakouts" | |
| }, | |
| "filters" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.filters" | |
| }, | |
| "limit" : { | |
| "type" : "integer", | |
| "minimum" : 0 | |
| }, | |
| "joins" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.joins" | |
| }, | |
| "aggregation" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.aggregation.aggregations" | |
| }, | |
| "fields" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.fields" | |
| }, | |
| "source-table" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.table" | |
| }, | |
| "order-by" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.order-by.order-bys" | |
| }, | |
| "page" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.page" | |
| }, | |
| "parameters" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters" | |
| }, | |
| "expressions" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.expressions" | |
| } | |
| }, | |
| "required" : [ "lib/type" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema..stage.valid-refs" | |
| }, { | |
| "allOf" : [ ] | |
| } ] | |
| }, | |
| "mbql.clause.offset" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "offset" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.window..offset.n" | |
| } ] | |
| }, | |
| "mbql.clause.rtrim" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "rtrim" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.expression.number" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" | |
| } ] | |
| }, | |
| "mbql.clause.cum-sum" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "cum-sum" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "mbql.clause.if" : { }, | |
| "mbql.clause.does-not-contain" : { }, | |
| "metabase.lib.schema..stage.type" : { | |
| "type" : "string", | |
| "enum" : [ "mbql.stage/native", "mbql.stage/mbql" ] | |
| }, | |
| "mbql.clause.sqrt" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "sqrt" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "metabase.lib.schema.binning.num-bins" : { | |
| "description" : "Number of bins to use.", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "mbql.clause.is-empty" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "is-empty" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" | |
| } ] | |
| }, | |
| "mbql.clause.not" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "not" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" | |
| } ] | |
| }, | |
| "metabase.lib.schema.literal.non-integer-real" : { | |
| "anyOf" : [ { | |
| "type" : "number" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.jvm.float" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.jvm.big-decimal" | |
| } ] | |
| }, | |
| "metabase.lib.schema.literal.datetime" : { | |
| "anyOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.datetime" | |
| }, { }, { }, { } ] | |
| }, | |
| "metabase.lib.schema.expression.temporal..relative-datetime.amount" : { | |
| "oneOf" : [ { | |
| "const" : "current" | |
| }, { | |
| "type" : "integer" | |
| } ] | |
| }, | |
| "metabase.lib.schema.id.database" : { | |
| "description" : "Valid Database ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "metabase.legacy-mbql.schema.field" : { | |
| "description" : "Schema for a valid MBQL 4 :field clause.", | |
| "allOf" : [ { | |
| "description" : "schema for a valid MBQL 4 :field clause", | |
| "allOf" : [ ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.require-base-type-for-field-name" | |
| } ] | |
| }, | |
| "metabase.lib.schema.id.action" : { | |
| "description" : "Valid Action ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "mbql.clause.regex-match-first" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "regex-match-first" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "mbql.clause.temporal-extract" : { }, | |
| "mbql.clause.now" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "now" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| } ] | |
| }, | |
| "mbql.clause.measure" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "measure" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.measure" | |
| } ] | |
| }, | |
| "metabase.lib.schema.expression.arithmetic.plus-minus-numeric-schema" : { }, | |
| "metabase.lib.schema.literal.date" : { | |
| "anyOf" : [ { }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.date" | |
| } ] | |
| }, | |
| "mbql.clause.min" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "min" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| } ] | |
| }, | |
| "mbql.clause.host" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "host" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "mbql.clause.during" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "during" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| }, { | |
| "anyOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.date" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.datetime" | |
| } ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" | |
| } ] | |
| }, | |
| "mbql.clause._BANG__EQ_" : { }, | |
| "metabase.lib.schema.join.fields" : { | |
| "description" : "The Fields to include in the results *if* a top-level `:fields` clause *is not* specified. This can be either\n `:none`, `:all`, or a sequence of Field clauses.\n\n * `:none`: no Fields from the joined table or nested query are included (unless indirectly included by breakouts or\n other clauses). This is the default, and what is used for automatically-generated joins.\n\n * `:all`: will include all of the Fields from the joined table or query\n\n * a sequence of Field clauses: include only the Fields specified. Only `:field` clauses are allowed here! References\n to expressions or aggregations in the thing we're joining should use column literal (string column name) `:field`\n references. This should be non-empty and all elements should be distinct (ignoring `:lib/uuid`).", | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "enum" : [ "all", "none" ] | |
| }, { | |
| "allOf" : [ { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/mbql.clause.field" | |
| }, | |
| "minItems" : 1 | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.util.distinct-mbql-clauses" | |
| } ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.template-tag.template-tag" : { | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.type" | |
| } | |
| }, | |
| "required" : [ "type" ] | |
| }, { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.temporal-unit" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.field-filter" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.snippet" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.source-query" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.source-table" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.raw-value" | |
| } ] | |
| } ] | |
| }, | |
| "mbql.clause.relative-datetime" : { }, | |
| "metabase.lib.schema.expression.temporal.timezone-id" : { | |
| "allOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "anyOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal..string.zone-offset" | |
| } ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.template-tag.type" : { | |
| "description" : "Schema for valid values of template tag `:type`.", | |
| "type" : "string", | |
| "enum" : [ "snippet", "card", "dimension", "number", "text", "date", "boolean", "temporal-unit", "table" ] | |
| }, | |
| "mbql.clause.count-where" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "count-where" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata.fingerprint.percent" : { | |
| "description" : "Schema for something represting a percentage. A floating-point value between (inclusive) 0 and 1.", | |
| "type" : "number" | |
| }, | |
| "metabase.lib.schema.query" : { | |
| "allOf" : [ { | |
| "description" : "Valid MBQL 5 query.", | |
| "type" : "object", | |
| "properties" : { | |
| "lib/metadata" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.metadata-provider" | |
| }, | |
| "update-row" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.actions.row" | |
| }, | |
| "lib/type" : { | |
| "default" : "mbql/query", | |
| "const" : "mbql/query" | |
| }, | |
| "settings" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.settings.settings" | |
| }, | |
| "constraints" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.constraints.constraints" | |
| }, | |
| "info" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.info.info" | |
| }, | |
| "middleware" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.middleware-options.middleware-options" | |
| }, | |
| "database" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.saved-questions-virtual-database" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.database" | |
| } ] | |
| }, | |
| "stages" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.stages" | |
| }, | |
| "parameters" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameters" | |
| }, | |
| "create-row" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.actions.row" | |
| } | |
| }, | |
| "required" : [ "lib/type", "stages" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.util.unique-uuids" | |
| }, { | |
| "allOf" : [ ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.id.saved-questions-virtual-database" : { | |
| "description" : "The ID used to signify that a database is 'virtual' rather than physical.\n\n A fake integer ID is used so as to minimize the number of changes that need to be made on the frontend -- by using\n something that would otherwise be a legal ID, *nothing* need change there, and the frontend can query against this\n 'database' none the wiser. (This integer ID is negative which means it will never conflict with a *real* database\n ID.)\n\n This ID acts as a sort of flag. The relevant places in the middleware can check whether the DB we're querying is\n this 'virtual' database and take the appropriate actions.", | |
| "const" : -1337 | |
| }, | |
| "metabase.lib.schema.template-tag.source-table" : { | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "display-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "emit-alias" : { | |
| "type" : "boolean" | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name" | |
| }, | |
| "source-filters" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.source-filter" | |
| } | |
| }, | |
| "table-id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.table" | |
| }, | |
| "type" : { | |
| "const" : "table" | |
| } | |
| }, | |
| "required" : [ "name", "display-name", "type", "table-id" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension" | |
| } ] | |
| }, | |
| "mbql.clause.sum-where" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "sum-where" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" | |
| } ] | |
| }, | |
| "metabase.lib.schema.info.info" : { | |
| "description" : "Schema for query `:info` dictionary, which is used for informational purposes to record information about how a query\n was executed in QueryExecution and other places. It is considered bad form for middleware to change its behavior\n based on this information, don't do it!\n\n TODO - this schema is somewhat misleading because if you use a function\n like [[metabase.query-processor/userland-query]] some of these keys (e.g. `:context`) are in fact required", | |
| "type" : "object", | |
| "properties" : { | |
| "query-hash" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.info.hash" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "action-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.action" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lens-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "pivot/original-query" : { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "additionalProperties" : { } | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "executed-by" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.user" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "card-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.card" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "pivot/result-metadata" : { | |
| "oneOf" : [ { | |
| "oneOf" : [ { | |
| "const" : "none" | |
| }, { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.column" | |
| } | |
| } ] | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "transform-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.transform" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "context" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.info.context" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "dashboard-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.dashboard" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lens-params" : { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "additionalProperties" : { } | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metadata/model-metadata" : { | |
| "oneOf" : [ { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.lib-or-legacy-column" | |
| } | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "pulse-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.pulse" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "card-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| } | |
| }, | |
| "metabase.lib.schema.template-tag.temporal-unit" : { | |
| "type" : "object", | |
| "properties" : { | |
| "alias" : { | |
| "type" : "string" | |
| }, | |
| "dimension" : { | |
| "$ref" : "#/components/schemas/mbql.clause.field" | |
| }, | |
| "display-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name" | |
| }, | |
| "type" : { | |
| "const" : "temporal-unit" | |
| } | |
| }, | |
| "required" : [ "name", "display-name", "type" ] | |
| }, | |
| "metabase.lib.schema.literal.jvm.big-decimal" : { }, | |
| "mbql.clause.aggregation" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "aggregation" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.ref.aggregation-options" | |
| }, { | |
| "type" : "string" | |
| } ] | |
| }, | |
| "mbql.clause.datetime-add" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "datetime-add" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| }, { | |
| "type" : "integer" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" | |
| } ] | |
| }, | |
| "metabase.lib.schema.template-tag.disallow-dimension" : { }, | |
| "metabase.lib.schema.expression.integer" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata.fingerprint..fingerprint.text" : { | |
| "description" : "Schema for fingerprint information for Fields deriving from `:type/Text`.", | |
| "type" : "object", | |
| "properties" : { | |
| "average-length" : { | |
| "oneOf" : [ { | |
| "type" : "number" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "percent-email" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "percent-json" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "percent-state" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "percent-url" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| } | |
| }, | |
| "mbql.clause.time" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "time" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| }, { | |
| "anyOf" : [ { | |
| "const" : "default" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.time.interval" | |
| } ] | |
| } ] | |
| }, | |
| "mbql.clause.time-interval" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "time-interval" | |
| }, { | |
| "default" : { }, | |
| "allOf" : [ { | |
| "description" : "Options for `:time-interval` operator. Note that `:relative-time-interval` does not support these options.", | |
| "type" : "object", | |
| "properties" : { | |
| "lib/uuid" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, | |
| "base-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "include-current" : { | |
| "type" : "boolean" | |
| } | |
| }, | |
| "required" : [ "lib/uuid" ] | |
| }, { } ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| }, { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "enum" : [ "current", "last", "next" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.integer" | |
| } ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" | |
| } ] | |
| }, | |
| "mbql.clause.percentile" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "percentile" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.aggregation..percentile.percentile" | |
| } ] | |
| }, | |
| "metabase.lib.schema.id.segment" : { | |
| "description" : "Valid legacy Segment ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "metabase.lib.schema.template-tag.raw-value" : { | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "default" : { }, | |
| "display-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name" | |
| }, | |
| "required" : { | |
| "type" : "boolean" | |
| }, | |
| "type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag..raw-value.type" | |
| } | |
| }, | |
| "required" : [ "name", "display-name", "type" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata.fingerprint.fingerprint" : { | |
| "description" : "Schema for a Field 'fingerprint' generated as part of the analysis stage. Used to power the 'classification'\n sub-stage of analysis. Stored as the `fingerprint` column of Field.", | |
| "type" : "object", | |
| "properties" : { | |
| "experimental" : { | |
| "type" : "object", | |
| "additionalProperties" : { } | |
| }, | |
| "global" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.global" | |
| }, | |
| "type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint..fingerprint.type-specific" | |
| } | |
| } | |
| }, | |
| "metabase.lib.schema.breakout" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.ref.ref" | |
| }, | |
| "metabase.lib.schema.metadata.fingerprint..fingerprint.global" : { | |
| "description" : "Fingerprint values that Fields of all types should have.", | |
| "type" : "object", | |
| "properties" : { | |
| "distinct-count" : { | |
| "type" : "integer" | |
| }, | |
| "nil%" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.percent" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| } | |
| }, | |
| "mbql.clause.date" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "date" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "anyOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| } ] | |
| } ] | |
| }, | |
| "mbql.clause.lower" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "lower" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata..column.remapping.external" : { | |
| "description" : "External remapping (Dimension) for a column. From the [[metabase.warehouse-schema.models.dimension]] with `type =\n external` associated with a `Field` in the application database.\n See [[metabase.query-processor.middleware.add-remaps]] for what this means.", | |
| "type" : "object", | |
| "properties" : { | |
| "field-id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.dimension" | |
| }, | |
| "lib/type" : { | |
| "const" : "metadata.column.remapping/external" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| } | |
| }, | |
| "required" : [ "lib/type", "id", "name", "field-id" ] | |
| }, | |
| "mbql.clause.get-second" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "get-second" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata.column" : { | |
| "description" : "Malli schema for a valid map of column metadata, which can mean one of two things:\n\n 1. Metadata about a particular Field in the application database. This will always have an `:id`\n\n 2. Results metadata from a column in `data.cols` and/or `data.results_metadata.columns` in a Query Processor\n response, or saved in something like `Card.result_metadata`. These *may* have an `:id`, or may not -- columns\n coming back from native queries or things like `SELECT count(*)` aren't associated with any particular `Field`\n and thus will not have an `:id`.\n\n Now maybe these should be two different schemas, but `:id` being there or not is the only real difference; besides\n that they are largely compatible. So they're the same for now. We can revisit this in the future if we actually want\n to differentiate between the two versions.", | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "visibility-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "fk-join-alias" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metabase.lib.metadata.result-metadata/field-ref" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/external-remap" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "inherited-temporal-unit" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source-column-alias" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.source-column-alias" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/temporal-unit" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/type" : { | |
| "default" : "metadata/column", | |
| "const" : "metadata/column" | |
| }, | |
| "settings" : { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "additionalProperties" : { } | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "fingerprint" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source-uuid" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/implicit-field?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/ref-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/deduplicated-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.deduplicated-name" | |
| }, | |
| "base-type" : { | |
| "default" : "type/*", | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, | |
| "lib/transformation-added-base-type" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-expression-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "fk-field-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/from-model?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "name" : { | |
| "type" : "string" | |
| }, | |
| "lib/card-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.card" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/expression-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/breakout?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/join-alias" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "nfc-path" : { | |
| "oneOf" : [ { | |
| "type" : "array", | |
| "items" : { | |
| "type" : "string" | |
| } | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/native-sandbox-column.propagate-coercion?" : { | |
| "type" : "boolean" | |
| }, | |
| "has-field-values" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/internal-remap" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "selected?" : { | |
| "type" : "boolean" | |
| }, | |
| "fk-field-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-binning" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-join-alias" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/native-sandbox-column.force-coercion-strategy" : { | |
| "type" : "string" | |
| }, | |
| "lib/binning" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metabase.lib.metadata.result-metadata/source" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "active" : { | |
| "type" : "boolean" | |
| }, | |
| "lib/ref-display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.original-name" | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "fk-target-field-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/simple-display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/desired-column-alias" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.desired-column-alias" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| }, | |
| "required" : [ "lib/type", "name", "base-type" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.kebab-cased-map" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source" | |
| }, { | |
| "allOf" : [ ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.middleware-options.middleware-options" : { | |
| "description" : "Additional options that can be used to toggle middleware on or off.", | |
| "type" : "object", | |
| "properties" : { | |
| "add-default-userland-constraints?" : { | |
| "description" : "Whether to add some default `max-results` and `max-results-bare-rows` constraints. By default, none are added,\n although the functions that ultimately power most API endpoints tend to set this to `true`. See\n `add-constraints` middleware for more details.", | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "disable-max-results?" : { | |
| "description" : "Disable applying a default limit on the query results. Handled in the `add-default-limit` middleware. If true,\n this will override the `:max-results` and `:max-results-bare-rows` values in `Constraints`.", | |
| "type" : "boolean" | |
| }, | |
| "disable-mbql->native?" : { | |
| "description" : "Disable the MBQL->native middleware. If you do this, the query will not work at all, so there are no cases where\n you should set this yourself. This is only used by the `metabase.query-processor.preprocess/preprocess` function to\n get the fully pre-processed query without attempting to convert it to native.", | |
| "type" : "boolean" | |
| }, | |
| "format-rows?" : { | |
| "description" : "Should we skip converting datetime types to ISO-8601 strings with appropriate timezone when post-processing\n results? Used by `metabase.query-processor.middleware.format-rows`default `false`.", | |
| "type" : "boolean" | |
| }, | |
| "process-viz-settings?" : { | |
| "description" : "Whether to process a question's visualization settings and include them in the result metadata so that they can\n incorporated into an export. Used by `metabase.query-processor.middleware.visualization-settings`; default\n `false`.", | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "skip-results-metadata?" : { | |
| "description" : "Should we skip adding `results_metadata` to query results after running the query? Used by\n `metabase.query-processor.middleware.results-metadata`; default `false`. (Note: we may change the name of this\n column in the near future, to `result_metadata`, to fix inconsistencies in how we name things.)", | |
| "type" : "boolean" | |
| }, | |
| "userland-query?" : { | |
| "description" : "Userland queries are ones ran as a result of an API call, Pulse, or the like. Special handling is done in\n certain userland-only middleware for such queries -- results are returned in a slightly different format, and\n QueryExecution entries are normally saved, unless you pass `:no-save` as the option.", | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| } | |
| }, | |
| "metabase.lib.schema.util.distinct-mbql-clauses" : { }, | |
| "metabase.lib.schema.metadata..column.validate-for-source-joins" : { | |
| "allOf" : [ ] | |
| }, | |
| "mbql.clause.case" : { }, | |
| "metabase.legacy-mbql.schema.expression" : { | |
| "description" : "schema for a valid MBQL 4 :expression clause", | |
| "allOf" : [ ] | |
| }, | |
| "metabase.lib.schema.stage" : { | |
| "default" : { | |
| "lib/type" : "mbql.stage/mbql" | |
| }, | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "lib/type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema..stage.type" | |
| } | |
| }, | |
| "required" : [ "lib/type" ] | |
| }, { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema..stage.native" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema..stage.mbql" | |
| } ] | |
| }, { | |
| "allOf" : [ ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter..target.legacy-field-ref" : { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.field" | |
| }, | |
| "metabase.lib.schema.common.non-blank-string" : { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, | |
| "metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" : { | |
| "type" : "object", | |
| "properties" : { | |
| "bin_width" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" | |
| }, | |
| "binning_strategy" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" | |
| }, | |
| "num_bins" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" | |
| }, | |
| "strategy" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, | |
| "metabase.lib.schema.literal..string.time" : { | |
| "anyOf" : [ { | |
| "type" : "string", | |
| "pattern" : "^\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?$" | |
| }, { | |
| "type" : "string", | |
| "pattern" : "^\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?(?:Z|(?:[+-]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?))$" | |
| } ] | |
| }, | |
| "mbql.clause.exp" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "exp" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "metabase.lib.schema.temporal-bucketing..unit.time.interval" : { | |
| "type" : "string", | |
| "enum" : [ "hour", "millisecond", "minute", "second" ] | |
| }, | |
| "mbql.clause.get-month" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "get-month" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| } ] | |
| }, | |
| "metabase.lib.schema.literal..string.date" : { | |
| "type" : "string", | |
| "pattern" : "^\\d{4}-\\d{2}-\\d{2}$" | |
| }, | |
| "mbql.clause._EQ_" : { }, | |
| "metabase.lib.schema.expression.temporal.week-mode" : { | |
| "type" : "string", | |
| "enum" : [ "iso", "us", "instance" ] | |
| }, | |
| "metabase.lib.schema.ref.aggregation-options" : { | |
| "default" : { }, | |
| "type" : "object", | |
| "properties" : { | |
| "base-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "lib/uuid" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, | |
| "name" : { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| }, | |
| "required" : [ "lib/uuid" ] | |
| }, | |
| "metabase.legacy-mbql.schema..legacy-column-metadata.qualified-keys" : { | |
| "type" : "object", | |
| "properties" : { | |
| "metabase.lib.metadata.result-metadata/field-ref" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/external-remap" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source-column-alias" : { | |
| "oneOf" : [ { | |
| "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/temporal-unit" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "default", "hour", "hour-of-day", "millisecond", "minute", "minute-of-hour", "month", "month-of-year", "quarter", "quarter-of-year", "second", "second-of-minute", "week", "week-of-year", "year", "year-of-era" ] | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/type" : { | |
| "default" : "metadata/column", | |
| "const" : "metadata/column" | |
| }, | |
| "lib/source-uuid" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/implicit-field?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/ref-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/deduplicated-name" : { | |
| "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name.", | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/transformation-added-base-type" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-expression-name" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/from-model?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/card-id" : { | |
| "oneOf" : [ { | |
| "description" : "Valid Card ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/expression-name" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/breakout?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-effective-type" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/join-alias" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/native-sandbox-column.propagate-coercion?" : { | |
| "type" : "boolean" | |
| }, | |
| "lib/internal-remap" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-binning" : { | |
| "oneOf" : [ { | |
| "description" : "Schema for `:binning` options passed to a `:field` clause.", | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "strategy" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "strategy" : { | |
| "const" : "default" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "bin-width" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" | |
| }, | |
| "strategy" : { | |
| "const" : "bin-width" | |
| } | |
| }, | |
| "required" : [ "strategy", "bin-width" ] | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "num-bins" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" | |
| }, | |
| "strategy" : { | |
| "const" : "num-bins" | |
| } | |
| }, | |
| "required" : [ "strategy", "num-bins" ] | |
| } ] | |
| } ] | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-join-alias" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/native-sandbox-column.force-coercion-strategy" : { | |
| "type" : "string" | |
| }, | |
| "lib/binning" : { | |
| "oneOf" : [ { | |
| "description" : "Schema for `:binning` options passed to a `:field` clause.", | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "strategy" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "strategy" : { | |
| "const" : "default" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "bin-width" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" | |
| }, | |
| "strategy" : { | |
| "const" : "bin-width" | |
| } | |
| }, | |
| "required" : [ "strategy", "bin-width" ] | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "num-bins" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" | |
| }, | |
| "strategy" : { | |
| "const" : "num-bins" | |
| } | |
| }, | |
| "required" : [ "strategy", "num-bins" ] | |
| } ] | |
| } ] | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metabase.lib.metadata.result-metadata/source" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/ref-display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-name" : { | |
| "description" : "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names.", | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/simple-display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/desired-column-alias" : { | |
| "oneOf" : [ { | |
| "description" : "Name we should use as a column alias for a column in this stage of a query. The desired column alias in stage N\n becomes the source column alias in stage N+1. The right-hand side (RHS) in\n\n SELECT lhs AS rhs", | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| } | |
| }, | |
| "metabase.lib.schema.literal..string.datetime" : { | |
| "anyOf" : [ { | |
| "type" : "string", | |
| "pattern" : "^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?$" | |
| }, { | |
| "type" : "string", | |
| "pattern" : "^\\d{4}-\\d{2}-\\d{2}[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?(?:Z|(?:[+-]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,6})?)?))$" | |
| } ] | |
| }, | |
| "mbql.clause.text" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "text" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter.parameters" : { | |
| "description" : "Schema for a list of `:parameters` as passed in to a query.", | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter.parameter" | |
| } | |
| }, | |
| "metabase.lib.schema.literal..string.year-month" : { | |
| "type" : "string", | |
| "pattern" : "^\\d{4}-\\d{2}$" | |
| }, | |
| "metabase.lib.schema.filter.string-filter-options" : { | |
| "description" : "String filter operator options. Only set for `:contains`, `:does-not-contain`, `:starts-with`, `:ends-with`\n operators.", | |
| "type" : "object", | |
| "properties" : { | |
| "case-sensitive" : { | |
| "type" : "boolean" | |
| } | |
| } | |
| }, | |
| "metabase.lib.schema.expression.temporal..absolute-datetime.options" : { | |
| "default" : { }, | |
| "type" : "object", | |
| "properties" : { | |
| "base-type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/uuid" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, | |
| "name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| }, | |
| "required" : [ "lib/uuid" ] | |
| }, | |
| "metabase.legacy-mbql.schema.legacy-column-metadata" : { | |
| "description" : "Schema for a single legacy metadata column. This is the pre-Lib equivalent of\n `:metabase.lib.schema.metadata/column`.", | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "metabase.lib.metadata.result-metadata/field-ref" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "field_ref" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/external-remap" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source-column-alias" : { | |
| "oneOf" : [ { | |
| "description" : "Name for a column as returned/projected by the previous stage of the query or source Table/source Card. The\n left-hand side (LHS) of\n\n SELECT lhs AS rhs", | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/temporal-unit" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "default", "hour", "hour-of-day", "millisecond", "minute", "minute-of-hour", "month", "month-of-year", "quarter", "quarter-of-year", "second", "second-of-minute", "week", "week-of-year", "year", "year-of-era" ] | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/type" : { | |
| "default" : "metadata/column", | |
| "const" : "metadata/column" | |
| }, | |
| "fingerprint" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "visibility_type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "base_type" : { | |
| "default" : "type/*", | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, | |
| "lib/source-uuid" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/implicit-field?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/ref-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/deduplicated-name" : { | |
| "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name.", | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/transformation-added-base-type" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-expression-name" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/from-model?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "name" : { | |
| "type" : "string" | |
| }, | |
| "lib/card-id" : { | |
| "oneOf" : [ { | |
| "description" : "Valid Card ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/expression-name" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/breakout?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "semantic_type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-effective-type" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/join-alias" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display_name" : { | |
| "type" : "string" | |
| }, | |
| "qp/native-sandbox-column.propagate-coercion?" : { | |
| "type" : "boolean" | |
| }, | |
| "lib/internal-remap" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "converted_timezone" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "source" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "binning_info" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema..legacy-column-metadata.binning-info" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-binning" : { | |
| "oneOf" : [ { | |
| "description" : "Schema for `:binning` options passed to a `:field` clause.", | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "strategy" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "strategy" : { | |
| "const" : "default" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "bin-width" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" | |
| }, | |
| "strategy" : { | |
| "const" : "bin-width" | |
| } | |
| }, | |
| "required" : [ "strategy", "bin-width" ] | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "num-bins" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" | |
| }, | |
| "strategy" : { | |
| "const" : "num-bins" | |
| } | |
| }, | |
| "required" : [ "strategy", "num-bins" ] | |
| } ] | |
| } ] | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "effective_type" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, | |
| "lib/original-join-alias" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "unit" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/native-sandbox-column.force-coercion-strategy" : { | |
| "type" : "string" | |
| }, | |
| "lib/binning" : { | |
| "oneOf" : [ { | |
| "description" : "Schema for `:binning` options passed to a `:field` clause.", | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "strategy" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "strategy" : { | |
| "const" : "default" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "bin-width" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" | |
| }, | |
| "strategy" : { | |
| "const" : "bin-width" | |
| } | |
| }, | |
| "required" : [ "strategy", "bin-width" ] | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "num-bins" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" | |
| }, | |
| "strategy" : { | |
| "const" : "num-bins" | |
| } | |
| }, | |
| "required" : [ "strategy", "num-bins" ] | |
| } ] | |
| } ] | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metabase.lib.metadata.result-metadata/source" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/ref-display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-name" : { | |
| "description" : "The original name of the column as it appeared in the very first place it came from (i.e., the physical name of the\n column in the table it appears in). This should be the same as the `:lib/source-column-alias` for the very first\n usage of the column.\n Allowed to be blank because some databases like SQL Server allow blank column names.", | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "description" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/simple-display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string", | |
| "minLength" : 1 | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/desired-column-alias" : { | |
| "oneOf" : [ { | |
| "description" : "Name we should use as a column alias for a column in this stage of a query. The desired column alias in stage N\n becomes the source column alias in stage N+1. The right-hand side (RHS) in\n\n SELECT lhs AS rhs", | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| }, | |
| "required" : [ "base_type", "display_name", "name" ] | |
| }, { | |
| "allOf" : [ ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata..column.has-field-values" : { | |
| "type" : "string", | |
| "enum" : [ "auto-list", "list", "none", "search" ] | |
| }, | |
| "metabase.lib.schema.metadata..column.legacy-source" : { | |
| "description" : "Possible values for `column.source` -- this is added by [[metabase.lib.metadata.result-metadata]] for historical\n reasons (it is used in a few places in the FE). DO NOT use this in the backend for any purpose, use `:lib/source`\n instead.", | |
| "type" : "string", | |
| "enum" : [ "aggregation", "fields", "breakout", "native" ] | |
| }, | |
| "mbql.clause._GT_" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : ">" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.orderable" | |
| } ] | |
| }, | |
| "mbql.clause.value" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "value" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal..value.options" | |
| }, { } ] | |
| }, | |
| "metabase.lib.schema.mbql-clause.clause" : { | |
| "oneOf" : [ { }, { | |
| "$ref" : "#/components/schemas/mbql.clause._BANG__EQ_" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause._STAR_" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause._PLUS_" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.-" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause._SLASH_" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause._LT_" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause._LT__EQ_" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause._EQ_" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause._GT_" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause._GT__EQ_" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.abs" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.absolute-datetime" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.aggregation" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.and" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.asc" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.avg" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.between" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.case" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.ceil" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.coalesce" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.collate" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.concat" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.contains" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.convert-timezone" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.count" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.count-where" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.cum-count" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.cum-sum" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.date" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.datetime" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.datetime-add" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.datetime-diff" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.datetime-subtract" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.day-name" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.desc" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.distinct" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.distinct-where" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.does-not-contain" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.domain" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.during" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.ends-with" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.exp" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.expression" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.field" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.float" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.floor" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.get-day" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.get-day-of-week" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.get-hour" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.get-minute" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.get-month" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.get-quarter" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.get-second" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.get-week" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.get-year" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.host" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.if" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.in" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.inside" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.integer" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.interval" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.is-empty" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.is-null" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.length" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.log" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.lower" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.ltrim" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.max" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.measure" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.median" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.metric" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.min" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.month-name" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.not" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.not-empty" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.not-in" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.not-null" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.now" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.offset" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.or" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.path" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.percentile" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.power" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.quarter-name" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.regex-match-first" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.relative-datetime" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.relative-time-interval" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.replace" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.round" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.rtrim" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.segment" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.share" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.split-part" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.sqrt" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.starts-with" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.stddev" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.subdomain" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.substring" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.sum" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.sum-where" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.temporal-extract" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.text" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.time" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.time-interval" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.today" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.trim" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.upper" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.value" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.var" | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter.template-tag" : { | |
| "description" : "This is the reference like [:template-tag <whatever>], not the schema for native query template tags -- that lives\n in [[metabase.lib.schema.template-tag]].", | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "template-tag" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.parameter..template-tag.tag-name" | |
| } ] | |
| }, | |
| "mbql.clause.get-day-of-week" : { }, | |
| "metabase.lib.schema.common.base-type" : { | |
| "type" : "string" | |
| }, | |
| "metabase.lib.schema.template-tag.name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "metabase.lib.schema.literal..value.options" : { | |
| "default" : { }, | |
| "type" : "object", | |
| "properties" : { | |
| "base-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "effective-type" : { | |
| "type" : "string" | |
| }, | |
| "lib/uuid" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, | |
| "name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "unit" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| }, | |
| "required" : [ "lib/uuid", "effective-type" ] | |
| }, | |
| "metabase.lib.schema.metadata.lib-or-legacy-column" : { | |
| "description" : "Schema for the maps in card `:result-metadata` and similar. These can be either\n `:metabase.lib.schema.metadata/result-metadata` (i.e., kebab-cased) maps, or map snake_cased as returned by QP\n metadata, but they should NOT be a mixture of both -- if we mixed them somehow there is a bug in our code.", | |
| "oneOf" : [ { | |
| "description" : "Malli schema for a valid map of column metadata, which can mean one of two things:\n\n 1. Metadata about a particular Field in the application database. This will always have an `:id`\n\n 2. Results metadata from a column in `data.cols` and/or `data.results_metadata.columns` in a Query Processor\n response, or saved in something like `Card.result_metadata`. These *may* have an `:id`, or may not -- columns\n coming back from native queries or things like `SELECT count(*)` aren't associated with any particular `Field`\n and thus will not have an `:id`.\n\n Now maybe these should be two different schemas, but `:id` being there or not is the only real difference; besides\n that they are largely compatible. So they're the same for now. We can revisit this in the future if we actually want\n to differentiate between the two versions.", | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "visibility-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.visibility-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "fk-join-alias" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metabase.lib.metadata.result-metadata/field-ref" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.Reference" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/external-remap" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.external" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "inherited-temporal-unit" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source-column-alias" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.source-column-alias" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/temporal-unit" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/type" : { | |
| "default" : "metadata/column", | |
| "const" : "metadata/column" | |
| }, | |
| "settings" : { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "additionalProperties" : { } | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "fingerprint" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.fingerprint.fingerprint" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source-uuid" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/implicit-field?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/ref-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/deduplicated-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.deduplicated-name" | |
| }, | |
| "base-type" : { | |
| "default" : "type/*", | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, | |
| "lib/transformation-added-base-type" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-expression-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "fk-field-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/from-model?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "name" : { | |
| "type" : "string" | |
| }, | |
| "lib/card-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.card" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/expression-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/breakout?" : { | |
| "oneOf" : [ { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/join-alias" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "nfc-path" : { | |
| "oneOf" : [ { | |
| "type" : "array", | |
| "items" : { | |
| "type" : "string" | |
| } | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/native-sandbox-column.propagate-coercion?" : { | |
| "type" : "boolean" | |
| }, | |
| "has-field-values" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.has-field-values" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/internal-remap" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.remapping.internal" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "selected?" : { | |
| "type" : "boolean" | |
| }, | |
| "fk-field-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-binning" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-join-alias" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.alias" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "qp/native-sandbox-column.force-coercion-strategy" : { | |
| "type" : "string" | |
| }, | |
| "lib/binning" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.binning" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metabase.lib.metadata.result-metadata/source" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.legacy-source" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/source" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.source" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "active" : { | |
| "type" : "boolean" | |
| }, | |
| "lib/ref-display-name" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/original-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.original-name" | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "fk-target-field-id" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.field" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/simple-display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/desired-column-alias" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata.desired-column-alias" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| }, | |
| "required" : [ "lib/type", "name", "base-type" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.kebab-cased-map" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source" | |
| }, { | |
| "allOf" : [ ] | |
| } ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.legacy-mbql.schema.legacy-column-metadata" | |
| } ] | |
| }, | |
| "metabase.lib.schema.template-tag.common" : { | |
| "type" : "object", | |
| "properties" : { | |
| "display-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name" | |
| } | |
| }, | |
| "required" : [ "name", "display-name" ] | |
| }, | |
| "metabase.lib.schema.literal.temporal" : { | |
| "anyOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.date" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.time" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.datetime" | |
| } ] | |
| }, | |
| "metabase.lib.schema.binning.strategy" : { | |
| "type" : "string", | |
| "enum" : [ "bin-width", "default", "num-bins" ] | |
| }, | |
| "mbql.clause.get-week" : { }, | |
| "metabase.lib.schema.constraints.constraints" : { | |
| "description" : "Additional constraints added to a query limiting the maximum number of rows that can be returned. Mostly useful\n because native queries don't support the MBQL `:limit` clause. For MBQL queries, if `:limit` is set, it will\n override these values.", | |
| "type" : "object", | |
| "properties" : { | |
| "max-results" : { | |
| "description" : "Maximum number of results to allow for a query with aggregations. If `max-results-bare-rows` is unset, this\n applies to all queries", | |
| "type" : "integer", | |
| "minimum" : 0 | |
| }, | |
| "max-results-bare-rows" : { | |
| "description" : "Maximum number of results to allow for a query with no aggregations. If set, this should be LOWER than\n `:max-results`.", | |
| "type" : "integer", | |
| "minimum" : 0 | |
| } | |
| } | |
| }, | |
| "metabase.lib.schema.literal..string.year" : { | |
| "type" : "string", | |
| "pattern" : "^\\d{4}$" | |
| }, | |
| "metabase.lib.schema.expression.temporal" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" | |
| } ] | |
| }, | |
| "mbql.clause.get-quarter" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "get-quarter" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| } ] | |
| }, | |
| "mbql.clause.distinct-where" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "distinct-where" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.aggregation..distinct.arg" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter.type" : { | |
| "description" : "Valid parameter :type", | |
| "default" : "text", | |
| "type" : "string", | |
| "enum" : [ "number", "text", "date", "boolean", "date/single", "id", "category", "location/city", "location/state", "location/zip_code", "location/country", "date/range", "date/month-year", "date/quarter-year", "date/relative", "date/all-options", "temporal-unit", "number/!=", "number/<=", "number/=", "number/>=", "number/between", "string/!=", "string/=", "string/contains", "string/does-not-contain", "string/ends-with", "string/starts-with", "boolean/=" ] | |
| }, | |
| "metabase.lib.schema.template-tag..template-tag-map.validate-names" : { }, | |
| "mbql.clause.relative-time-interval" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "relative-time-interval" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal" | |
| }, { | |
| "type" : "integer" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" | |
| }, { | |
| "type" : "integer" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing..unit.date-time.interval" | |
| } ] | |
| }, | |
| "metabase.lib.schema.metadata..column.validate-for-source" : { | |
| "description" : "Do additional validation for column metadata based on `:lib/source`.", | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-card" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-native" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-previous-stage" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-table-defaults" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-aggregations" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-joins" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-expressions" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.metadata..column.validate-for-source-implicitly-joinable" | |
| }, { } ] | |
| }, | |
| "metabase.lib.schema.metadata.fingerprint..fingerprint.temporal" : { | |
| "description" : "Schema for fingerprint information for Fields deriving from `:type/Temporal`.", | |
| "type" : "object", | |
| "properties" : { | |
| "earliest" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "latest" : { | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| } | |
| } | |
| }, | |
| "mbql.clause.share" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "share" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.boolean" | |
| } ] | |
| }, | |
| "metabase.lib.schema.filter.time-interval-options" : { | |
| "description" : "Options for `:time-interval` operator. Note that `:relative-time-interval` does not support these options.", | |
| "type" : "object", | |
| "properties" : { | |
| "include-current" : { | |
| "type" : "boolean" | |
| } | |
| } | |
| }, | |
| "metabase.lib.schema.literal.literal" : { | |
| "anyOf" : [ { | |
| "type" : "null" | |
| }, { | |
| "type" : "boolean" | |
| }, { | |
| "type" : "string" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.integer" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.non-integer-real" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.temporal" | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter.widget-type" : { | |
| "description" : "The type of widget to display in the FE UI for the user to use to pick values for this parameter.", | |
| "type" : "string", | |
| "enum" : [ "none", "number", "text", "date", "boolean", "date/single", "id", "category", "location/city", "location/state", "location/zip_code", "location/country", "date/range", "date/month-year", "date/quarter-year", "date/relative", "date/all-options", "temporal-unit", "number/!=", "number/<=", "number/=", "number/>=", "number/between", "string/!=", "string/=", "string/contains", "string/does-not-contain", "string/ends-with", "string/starts-with", "boolean/=" ] | |
| }, | |
| "metabase.lib.schema.join.conditions" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.join.condition" | |
| }, | |
| "minItems" : 1 | |
| }, | |
| "metabase.lib.schema.id.card" : { | |
| "description" : "Valid Card ID", | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "mbql.clause.stddev" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "stddev" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "metabase.lib.schema.expression.boolean" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" | |
| } ] | |
| }, | |
| "mbql.clause.datetime" : { }, | |
| "metabase.lib.schema.expression.arithmetic.temporal-difference-schema" : { }, | |
| "metabase.lib.schema.metadata..column.validate-for-source-implicitly-joinable" : { | |
| "allOf" : [ ] | |
| }, | |
| "metabase.lib.schema.page" : { | |
| "description" : "`page` = page num, starting with 1. `items` = number of items per page.\n e.g.\n\n {:page 1, :items 10} = items 1-10\n {:page 2, :items 10} = items 11-20", | |
| "type" : "object", | |
| "properties" : { | |
| "items" : { | |
| "type" : "integer", | |
| "minimum" : 1 | |
| }, | |
| "page" : { | |
| "type" : "integer", | |
| "minimum" : 1 | |
| } | |
| }, | |
| "required" : [ "page", "items" ] | |
| }, | |
| "metabase.lib.schema.template-tag.source-query" : { | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "card-id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.card" | |
| }, | |
| "display-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name" | |
| }, | |
| "type" : { | |
| "const" : "card" | |
| } | |
| }, | |
| "required" : [ "name", "display-name", "type", "card-id" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension" | |
| } ] | |
| }, | |
| "mbql.clause.subdomain" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "subdomain" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.order-by.order-by" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/mbql.clause.asc" | |
| }, { | |
| "$ref" : "#/components/schemas/mbql.clause.desc" | |
| } ] | |
| }, | |
| "mbql.clause.floor" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "floor" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| }, | |
| "mbql.clause.ltrim" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "ltrim" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| } ] | |
| }, | |
| "metabase.lib.schema.template-tag.snippet" : { | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "database" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.database" | |
| }, | |
| "display-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.id" | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.name" | |
| }, | |
| "snippet-id" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.id.snippet" | |
| }, | |
| "snippet-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "type" : { | |
| "const" : "snippet" | |
| } | |
| }, | |
| "required" : [ "name", "display-name", "type", "snippet-name" ] | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.template-tag.disallow-dimension" | |
| } ] | |
| }, | |
| "metabase.lib.schema.parameter..dimension.options" : { | |
| "type" : "object", | |
| "properties" : { | |
| "stage-number" : { | |
| "type" : "integer" | |
| } | |
| } | |
| }, | |
| "metabase.lib.schema.binning.binning" : { | |
| "description" : "Schema for `:binning` options passed to a `:field` clause.", | |
| "allOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "strategy" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.strategy" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, { | |
| "oneOf" : [ { | |
| "type" : "object", | |
| "properties" : { | |
| "strategy" : { | |
| "const" : "default" | |
| } | |
| }, | |
| "required" : [ "strategy" ] | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "bin-width" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.bin-width" | |
| }, | |
| "strategy" : { | |
| "const" : "bin-width" | |
| } | |
| }, | |
| "required" : [ "strategy", "bin-width" ] | |
| }, { | |
| "type" : "object", | |
| "properties" : { | |
| "num-bins" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.binning.num-bins" | |
| }, | |
| "strategy" : { | |
| "const" : "num-bins" | |
| } | |
| }, | |
| "required" : [ "strategy", "num-bins" ] | |
| } ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.ref..expression.options" : { | |
| "default" : { }, | |
| "type" : "object", | |
| "properties" : { | |
| "base-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "database-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "lib/uuid" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.uuid" | |
| }, | |
| "name" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "semantic-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.semantic-or-relation-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "temporal-unit" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.temporal-bucketing.unit" | |
| } | |
| }, | |
| "required" : [ "lib/uuid" ] | |
| }, | |
| "metabase.lib.schema.temporal-bucketing..unit.date" : { | |
| "type" : "string", | |
| "enum" : [ "day", "day-of-month", "day-of-week", "day-of-year", "month", "month-of-year", "quarter", "quarter-of-year", "week", "week-of-year", "year", "year-of-era" ] | |
| }, | |
| "metabase.lib.schema.settings.settings" : { | |
| "description" : "Options that tweak the behavior of the query processor.", | |
| "type" : "object", | |
| "properties" : { | |
| "include-sensitive-fields" : { | |
| "description" : "Whether to include fields with visibility_type :sensitive when fetching query metadata.", | |
| "type" : "boolean" | |
| }, | |
| "report-timezone" : { | |
| "description" : "The timezone the query should be ran in, overriding the default report timezone for the instance.", | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.temporal.timezone-id" | |
| } | |
| } | |
| }, | |
| "mbql.clause.integer" : { | |
| "type" : "array", | |
| "prefixItems" : [ { | |
| "const" : "integer" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.options" | |
| }, { | |
| "anyOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.string" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.number" | |
| } ] | |
| } ] | |
| }, | |
| "metabase.lib.schema.aggregation..distinct.arg" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.expression.expression" | |
| }, | |
| "metabase.lib.schema.metadata.metadata-provider" : { | |
| "description" : "Schema for something that satisfies the [[metabase.lib.metadata.protocols/MetadataProvider]] protocol.", | |
| "$ref" : "#/components/schemas/metabase.lib.metadata.protocols.metadata-provider" | |
| }, | |
| "metabase.legacy-mbql.schema.AggregationRefOptions" : { | |
| "type" : "object", | |
| "properties" : { | |
| "base-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "display-name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| }, | |
| "effective-type" : { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.base-type" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "name" : { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.common.non-blank-string" | |
| } | |
| } | |
| }, | |
| "metabase.lib.schema.metadata.deduplicated-name" : { | |
| "description" : "The simply-deduplicated name that was historically used in QP results metadata (originally calculated by\n the [[metabase.query-processor.middleware.annotate]] middleware, now calculated\n by [[metabase.lib.middleware.result-metadata]]). This just adds suffixes to column names e.g. `ID` and `ID` become\n `ID` and `ID_2`, respectively. Kept around because many old field refs use this column name.", | |
| "oneOf" : [ { | |
| "type" : "string" | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metabase.lib.schema.expression.expression" : { | |
| "oneOf" : [ { | |
| "oneOf" : [ { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.mbql-clause.clause" | |
| }, { | |
| "$ref" : "#/components/schemas/metabase.lib.schema.literal.literal" | |
| } ] | |
| }, { | |
| "type" : "null" | |
| } ] | |
| }, | |
| "metabase.lib.schema.join.strategy" : { | |
| "description" : "Valid values for the optional `:strategy` key in a join. Note that these are only valid if the current Database\n supports that specific join type; these match 1:1 with the Database `:features`, e.g. a Database that supports left\n joins will support the `:left-join` feature.\n\n When `:strategy` is not specified, [[default-strategy]] is used.", | |
| "default" : "left-join", | |
| "type" : "string", | |
| "enum" : [ "left-join", "right-join", "inner-join", "full-join" ] | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment