Skip to main content Svelte Highlight v7.21.1

LookML language preview

1. A basic view

block headers, dimensions, measures, and sql values
horizon-dark
view: orders {
  sql_table_name: schema.orders ;;

  dimension: id {
    primary_key: yes
    type: number
    sql: ${TABLE}.id ;;
  }

  measure: total_orders {
    type: count
    drill_fields: [id]
  }
}
atom-one-dark
view: orders {
  sql_table_name: schema.orders ;;

  dimension: id {
    primary_key: yes
    type: number
    sql: ${TABLE}.id ;;
  }

  measure: total_orders {
    type: count
    drill_fields: [id]
  }
}
github-dark
view: orders {
  sql_table_name: schema.orders ;;

  dimension: id {
    primary_key: yes
    type: number
    sql: ${TABLE}.id ;;
  }

  measure: total_orders {
    type: count
    drill_fields: [id]
  }
}
dracula
view: orders {
  sql_table_name: schema.orders ;;

  dimension: id {
    primary_key: yes
    type: number
    sql: ${TABLE}.id ;;
  }

  measure: total_orders {
    type: count
    drill_fields: [id]
  }
}
nord
view: orders {
  sql_table_name: schema.orders ;;

  dimension: id {
    primary_key: yes
    type: number
    sql: ${TABLE}.id ;;
  }

  measure: total_orders {
    type: count
    drill_fields: [id]
  }
}
github
view: orders {
  sql_table_name: schema.orders ;;

  dimension: id {
    primary_key: yes
    type: number
    sql: ${TABLE}.id ;;
  }

  measure: total_orders {
    type: count
    drill_fields: [id]
  }
}

2. An explore with a join

explore, join, and relationship literals
horizon-dark
explore: orders {
  join: customers {
    type: left_outer
    relationship: many_to_one
    sql_on: ${orders.customer_id} = ${customers.id} ;;
  }
}
atom-one-dark
explore: orders {
  join: customers {
    type: left_outer
    relationship: many_to_one
    sql_on: ${orders.customer_id} = ${customers.id} ;;
  }
}
github-dark
explore: orders {
  join: customers {
    type: left_outer
    relationship: many_to_one
    sql_on: ${orders.customer_id} = ${customers.id} ;;
  }
}
dracula
explore: orders {
  join: customers {
    type: left_outer
    relationship: many_to_one
    sql_on: ${orders.customer_id} = ${customers.id} ;;
  }
}
nord
explore: orders {
  join: customers {
    type: left_outer
    relationship: many_to_one
    sql_on: ${orders.customer_id} = ${customers.id} ;;
  }
}
github
explore: orders {
  join: customers {
    type: left_outer
    relationship: many_to_one
    sql_on: ${orders.customer_id} = ${customers.id} ;;
  }
}

3. Liquid templating

{% parameter %} and {{ value }} inside a sql field
horizon-dark
dimension: region_filtered {
  sql:
    {% if region._parameter_value == 'All' %}
      ${TABLE}.region
    {% else %}
      '{{ region._parameter_value }}'
    {% endif %}
  ;;
}
atom-one-dark
dimension: region_filtered {
  sql:
    {% if region._parameter_value == 'All' %}
      ${TABLE}.region
    {% else %}
      '{{ region._parameter_value }}'
    {% endif %}
  ;;
}
github-dark
dimension: region_filtered {
  sql:
    {% if region._parameter_value == 'All' %}
      ${TABLE}.region
    {% else %}
      '{{ region._parameter_value }}'
    {% endif %}
  ;;
}
dracula
dimension: region_filtered {
  sql:
    {% if region._parameter_value == 'All' %}
      ${TABLE}.region
    {% else %}
      '{{ region._parameter_value }}'
    {% endif %}
  ;;
}
nord
dimension: region_filtered {
  sql:
    {% if region._parameter_value == 'All' %}
      ${TABLE}.region
    {% else %}
      '{{ region._parameter_value }}'
    {% endif %}
  ;;
}
github
dimension: region_filtered {
  sql:
    {% if region._parameter_value == 'All' %}
      ${TABLE}.region
    {% else %}
      '{{ region._parameter_value }}'
    {% endif %}
  ;;
}