Skip to main content

Migrating Looker Dimensions to Holistics

Overview​

Looker dimensions and Holistics dimensions serve similar purposes but have some key differences in syntax and capabilities:

Looker Dimension Migration

  1. Syntax Differences

    • Looker uses ${TABLE} for table references, Holistics uses #SOURCE
    • Looker uses ${field_name} for field references, Holistics uses {{ field_name }}
    • Looker uses sql: for definitions, Holistics uses definition: @sql or definition: @aql
  2. Data Types

    • Looker: string, number, time, yesno
    • Holistics: text, number, datetime/date, truefalse
  3. Date Handling

    • Looker uses dimension_group to create multiple time-based dimensions at modeling time
    • Holistics provides flexible date handling at query time - users can change date grains and extract date parts directly in the UI without requiring predefined dimensions. Please visit Date Drill, Date Part, and Time Intelligence Functions for more details.

Step-by-Step​

Step 1: Set Up Your Environment​

  1. Open your Looker view file containing the dimensions
  2. Create a new Holistics model file
  3. Have the type mapping reference ready

Step 2: Migrate Dimensions​

Handle simple column references
// Looker
dimension: first_name {
label: "First Name"
type: string
sql: ${TABLE}.first_name ;;
}

// Holistics
dimension first_name {
label: 'First Name'
type: 'text'
definition: @sql {{ #SOURCE.first_name }};;
}
Handle Computed Dimensions
// Looker
dimension: full_name {
type: string
sql: CONCAT(${first_name}, ' ', ${last_name}) ;;
}

// Holistics
dimension full_name {
type: 'text'
definition: @sql CONCAT({{ first_name }}, ' ', {{ last_name }});;
}
Handle Case Statements
// Looker
dimension: size_tier {
case: {
when: {
sql: ${size} < 10 ;;
label: "Small"
}
when: {
sql: ${size} >= 10 AND ${size} < 50 ;;
label: "Medium"
}
else: "Large"
}
}

// Holistics (SQL definition)
dimension size_tier {
type: 'text'
definition: @sql
CASE
WHEN {{ size }} < 10 THEN 'Small'
WHEN {{ size }} >= 10 AND {{ size }} < 50 THEN 'Medium'
ELSE 'Large'
END;;
}

// Holistics (AQL definition)
dimension size_tier {
type: 'text'
definition: @aql
case(
when: model.size < 10, then: 'Small',
when: model.size >= 10 AND model.size < 50, then: 'Medium',
else: 'Large'
)
;;
}
Handle Date Dimensions
// Looker
dimension_group: created {
type: time
timeframes: [date, week, month, year]
sql: ${TABLE}.created_at ;;
}

// Holistics
dimension created_at {
type: 'datetime'
definition: @sql {{ #SOURCE.created_at }};;
}

In Holistics, users can change date grains (year, quarter, month, week, date) and extract date parts directly in the UI without requiring predefined dimensions like in Looker. Please refer to:

Step 3: Test and Validate​

  1. Check all dimension types are correctly mapped
  2. Verify SQL references are properly converted
  3. Test each dimension in a simple report
  4. Compare results with original Looker dimensions

Reference Manual​

Type Mapping​

Looker TypeHolistics TypeNotes
stringtextDirect mapping
numbernumberDirect mapping
timedatetimeUse date for date-only values
yesnotruefalseDirect mapping
tiertextConvert to CASE statement
locationtextNo direct equivalent

Property Mapping​

Looker PropertyHolistics PropertyNotes
labellabelDirect mapping
descriptiondescriptionDirect mapping
hiddenhiddenUse true/false instead of yes/no
sqldefinitionMust include @sql or @aql tag
typetypeSee Type Mapping

Unsupported Features​

The following Looker features don't have direct equivalents in Holistics:

  • alpha_sort
  • order_by_field
  • suggest_dimension
  • suggest_explore
  • tags
  • drill_fields -> will be supported in the future (learn more)

Best Practices​

  1. Use AQL for Complex Transformations

    • AQL provides better readability and maintainability
    • Easier to handle complex business logic
    • Better error messages and type checking
  2. Consistent Naming

    • Keep dimension names consistent with Looker for easier maintenance
    • Use clear, descriptive names for new dimensions
  3. Documentation

    • Always include descriptions for dimensions
    • Document any deviations from Looker implementation
  4. Testing

    • Create test reports to validate migrated dimensions
    • Compare results with original Looker reports
    • Test edge cases and null handling

Detailed Feature Comparison​

LookML ParameterPurposeSupportHolistics Equivalent & Implementation
Structural Parameters
dimensionCreates a dimension field✅Holistics dimension
dimension_groupCreates several time-based dimensions at the same time✅Holistics has several equivalent options:
- Date Drill
- Date Part
- Time Intelligence Functions
Action and Linking Parameters
actionCreates clickable actions on dimension values✔️ (partial)Holistics Actions
Note: Holistics Actions can only be defined in Dashboard layer
drill_fieldsSpecifies fields to show when drilling into dimension🛠️ (will support soon)Holistics Drill Down
tagsAdds text that can be passed to other applications❌No direct equivalent
linkCreates links to other Looker content or external URLs✅Can be solved with Holistics Actions
Display Parameters
aliasCreates alternate names for backward compatibility❌No direct equivalent
alpha_sortMakes case parameter sort conditions alphabetically❌No direct equivalent
descriptionAdds explanatory text for the dimension✅Uses description parameter
group_labelGroups dimensions together under a heading❌No direct equivalent
group_item_labelSpecifies label for field under its group label❌No direct equivalent
hiddenControls visibility in the UI✅Uses hidden parameter with true/false
labelChanges how the dimension appears in the UI✅Uses label parameter
order_by_fieldSorts dimension by values of another field❌No direct equivalent
styleChanges how tiers appear in UI❌No direct equivalent
view_labelChanges how dimension's view appears in field picker❌No direct equivalent
Filter Parameters
can_filterLets you prohibit a dimension from being used as a filter❌No direct equivalent
case_sensitiveControls case sensitivity in filters❌No direct equivalent
skip_drill_filterStops dimension from being added to filters when drilling❌No direct equivalent
Filter Suggestion Parameters
bypass_suggest_restrictionsShows suggestions when sql_always_where is in use❌No direct equivalent
full_suggestionsControls how database is queried for suggestions❌No direct equivalent
suggest_dimensionBases suggestions on values of different dimension❌No direct equivalent
suggest_exploreBases suggestions on values of different explore❌No direct equivalent
suggest_persist_forChanges cache settings for suggestions❌No direct equivalent
suggestableEnables or disables suggestions for a field❌No direct equivalent
suggestionsControls filter suggestions❌No direct equivalent
Query Parameters
convert_tzControls timezone conversion❌No direct equivalent
primary_keyIndicates if the dimension is a primary key❌No direct equivalent
required_access_grantsControls access based on user attributes❌No direct equivalent in basic AMQL, but Holistics handles access control differently
required_fieldsRequires additional fields when this field is chosen❌No direct equivalent
Value and Formatting Parameters
htmlModifies HTML output using Liquid templating❌No direct equivalent
sqlDefines the SQL expression for the dimension✅Uses definition with either @sql or @aql tag
sql_latitudeDefines latitude for location type dimensions❌No direct equivalent
sql_longitudeDefines longitude for location type dimensions❌No direct equivalent
typeSpecifies the data type of the dimension✅Uses type with values: 'text', 'number', 'date', 'datetime', 'truefalse'
Visualization Parameters
map_layer_nameSpecifies custom map for geographic data❌No direct equivalent

(*) Looker Parameters that are not mentioned in this table are generally not supported


Open Markdown
Let us know what you think about this document :)