Skip to main content
For an easier building experience, build your SQL view using the workbook and then promote it to the shared model.

Syntax

sql: |
  SELECT <statement>

Properties

sql
string
A raw SQL query that defines the view.

Examples

SQL view with primary key
sql: |
  SELECT *
  FROM users
  LIMIT 10

dimensions:
  id:
    sql: id
    primary_key: true
  first_name:
    sql: first_name