DatasetQuery

This page describes native queries.

DatasetQuery is attribute of Card, and just an object not a separate model.

Attributes

NativeDatasetQuery

Since we will be using native queries in most cases, this can be considered almost identical to DatasetQuery.

Name Type Description
type 'native'
database number database id
native NativeQuery

NativeQuery

Name Type Description Default
query string Query body like SQL ""
template-tags { [key: string]: TemplateTag } TemplateTag {}

TemplateTag

Name Type Description
id string UUID v4 format random id
name string Used as a key for mapping with filters on the dashboard.
display-name string Display name
type text | date | number | dimension
dimension ['field-id', field-id] field-id is ID on metabase_field table.Required if type === dimension.
widget-type string category, date/*, etc. See Parameters for types list.Required if type === dimension.

Source Code