Skip to main content
A SQL model organizes tables and columns from a relational source into a managed cube. The model workspace is used for modeling, and the query workspace runs read-only SQL.

Scope

Use this model type for PostgreSQL, MySQL, Doris, and other SQL connections supported by the platform connection service. Available types and fields depend on the options returned by the Data Sources page.

Modeling essentials

  • Refresh the data source browser structure and load table columns as needed.
  • Give each cube a fact table. Bind each measure to a fact-table column and choose its aggregation.
  • Level columns come from dimension tables. In the cube relationship settings, fill in the fact-table foreign key and dimension primary key.
  • Validate calculated-member expressions in the Query lab before publishing.
Model quality errors such as missing fact table, missing measure source column, or missing level source column mean that the structure is incomplete; they are not query syntax errors.

Query

Choose SQL in the Query lab. Start with the template or a simple aggregation to verify the connection, then add joins, filters, grouping, and sorting. Keep each statement read-only and single-statement; DDL, DML, and multi-statement queries are not supported. After publishing, queries use the published cube definition. Draft edits do not change live results. See Cubes, fact tables, and measures.