Skip to main content

Table Model

Knowledge Checkpoint

A grasp of these concepts will help you understand this documentation better:

Parameter definition

Parameter nameDescription
importAdd files to a model
modelsAdd models to be used in the querying
typeModel type (whether it is Table model or SQL model)
labelSpecifies how the model will appear in the Ready-to-explore Dataset
descriptionAdd model description
ownerDefine who should be in charge of managing the current model
table_nameChanges the SQL table on which a model is based
data_source_nameSpecify the database that Holistics will execute the generated query against (in the current model)
dimensionDefine a dimension.
measureDefine a measure.

Example Code

Model users {
type: 'table'
label: "Users"
data_source_name: 'bigquery_dw'
table_name: 'users'

dimension id {
label: 'ID'
type: 'number'
hidden: false // optional
definition: @sql {{#SOURCE.id}};; // optional
}

dimension email {
label: 'Email'
type: 'number'
// without "definition", it automatically uses the same column name as the dimension name ('email')
}

measure user_count {
type: 'number'
label: 'Count Users'
definition: @sql count({{#SOURCE.id}});;
}
}

Let us know what you think about this document :)