Skip to main content
A dataset is a saved SQL query tied to a specific datasource. Datasets are the foundation of everything you visualize in Mora, every chart on a dashboard gets its data from a dataset.

Creating a dataset

  1. Navigate to Datasets in the sidebar.
  2. Click New dataset.
  3. Select the datasource you want to query.
  4. Write your SQL in the editor.
  5. Press Cmd+Enter to preview results.
  6. Press Cmd+S to save and publish.

Dataset lifecycle

Datasets go through two stages:
  1. Draft: the query you are actively editing, by hand or via the AI. Unsaved changes show as a diff against the published query. See Draft and publish.
  2. Published: the saved query. Publishing runs the query against your database and materializes the results so charts can display them.

What happens when you publish

When you save a dataset, Mora runs the query in the background and stores the results. This means:
  • Charts load instantly from the materialized data, not from a live query every time.
  • You can apply transformations (group, aggregate, filter, sort) without hitting your database again.
  • Published results are updated each time you save.