Skip to main content
If the query view was created using SQL, this parameter will be automatically populated with the SQL query from the workbook. Otherwise, this parameter will be omitted.

Syntax

Single line
sql: <sql_statement>
Multi-line
sql: |
  <sql_statement>

Properties

sql
string
The SQL statement that the query view is based on. If the query view was created using SQL, this parameter will be automatically populated with the SQL query from the workbook.

Examples

sql_query_view.query.view
schema: PUBLIC
sql: |
  SELECT user_id, sum(sale_price) as total_sales
  FROM order_items
  GROUP BY 1
dimensions:
  user_id: {}
  total_sales: {}
  measures:
    count:
      aggregate_type: count