Query Definition Options

This page explains how to build and control queries using reusable blocks, how to select the source, insert and reorder blocks, and how their visual order determines the execution order.

Source Definition

Once you select the Source from the drop-down menu, the following block types appear.

  • Join Data

  • Filter Data

  • Row Limit

  • Sort Data

  • Summarize Data

newQueryDataSourceSelected.png

If you click the MagnifierIcon.png next to the Source field drop down, you can use the model view for better visual representation of the available data sources.

newQueryDataSourceModelView.png
Data Sources Model View

Blocks

Each block type is a separate section that can be inserted anywhere in the query flow, not only appended at the end. The execution order matches the visual order of blocks in the Query Definition editor. Moving or inserting a block changes when it is applied in the pipeline. The Add Section control is displayed between existing sections, allowing users to insert new blocks between them instead of rebuilding from the bottom.

newQueryDataSourceSelectedLinearSelection.png
Liner Selection
newQueryDataSourceSelectedNotLinearSelection.png
Selection Using Add Section

Behavior

  • Sort Data – Sort Data is an independent block. You can insert it anywhere after Source. The data passed to later blocks is already sorted at that point.

  • Row Limit – Row Limit is an independent block. You can insert it anywhere. Later blocks (for example Sort) work only with the limited result set.

It is the best practice to put Row Limit usually at the end and Sort Data typically after Filter Data or Summarize Data.

Validation & Error Handling

Certain combinations (e.g. a filter that references columns not yet created) are considered invalid block order. The application marks the invalid block(s) and explains what is wrong (e.g. missing fields from a previous stage). You cannot save or run a query until the invalid order is fixed.

newQueryDataSourceSelectedErrorMessageExample.png

Result Preview

Note that the Result Preview always reflects the current visual block order. Inserting or moving a block automatically updates the preview once the query is rerun, so users can iteratively test changes.