Fields - Dimension
Dimension
Dimension is used to gather value from cell or compute value based on single row of data.
Dimension is a table column on which you can’t use SQL aggregate functions like SUM or AVG. Almost all non-numeric data can be considered as a dimension. For example, color, department, country, city, name - they all are dimensions.
Dimensions can reference other dimensions.
fields: #begin of fields section (inside View or Model)
- dimension: dimension_name
hidden: false
label: 'field label in UI'
description: 'description in UI'
type: dimension_type
result: dimension_result
sql: 'SQL expression'
unnest: 'BigQuery UNNEST SQL expression'
format_number: '$,.0f'
currency_prefix: $
currency_suffix: ''
Dimension Parameters
Name | Type | Default | Description |
---|---|---|---|
dimension* | string | - | Field name |
label | string | - | Override field name in UI |
hidden | boolean | false | Hide field in UI |
description | string | - | Field description in UI |
type | enum | - | Dimension type:
|
result | enum | "number" | Resulting data type (after SQL transformations):
|
sql* | string | - | Way to calculate field through SQL expression (can use BlockML reference to other dimensions) |
unnest | string | - | (BigQuery) for example "JOIN UNNEST(payload.pages) AS page" |
format_number | string | - | Format Number |
currency_prefix | string | - | Format Number - Symbol |
currency_suffix | string | - | Format Number - Symbol |