Skip to main content

Build and Run Queries

Build a Query

You can build a query directly in Alloy Studio using its drag-and-drop environment, Query Builder. To create a query, right-click any class with mapped data and drag-and-drop the fields you want to the central panel. To execute the query, click play.

Convert query attributes to Derivations

Further define the expected results of a query by writing functions.

derivation in query

See your query in text mode (PURE)

Review and edit your created queries using the user-friendly UI mode also in text mode.

textmode in query

Notification upon exiting Query Editor

In order to prevent accidental loss of query edits when exiting the Query Editor, there is a pop up asking you if you would like to exit the Query Editor without saving your query. More details and video walkthrough here.

Leverage Subtype in Query Builder

Navigate properties of subtypes in the explorer tree. These properties can be used in building queries through projection, graph fetch and filter features in form mode. More details here.

subtype query

Search for properties when building your data query

You can search for data model properties when building a query. The search functionality includes filtering by specific data types and dragging & dropping of the selected property into the fetch panel. More details and video walkthrough here.

See the full element path of classes

When selecting the class you want to query, you can see the full element path to avoid picking the wrong class in case of duplicates. More details and video walkthrough here.

Review execution time and result set size of your query

You can see how long it takes to run your query and how many rows are being returned. This will help users to identify issues with their query. More details and video walkthrough here.

Toggle between light & dark theme

Click on the light bulb icon on the top right corner and you will see the Query Editor in light theme. More details and video walkthrough here.

Load a new query directly from the Query Editor.

Load a new query directly from the Query Editor.

More details and video walkthrough here.

Test Querying your Data model

Coming soon.

Core Features

Class Explorer

Coming soon.

Function Explorer

The function explorer shows you all the functions you have defined and lets you drag and drop to selected panels in the query builder including the derviation projection columns.

Function Explorer

Parameters

Parameters are variables assigned to your query. They are dynamic in nature and can change for each execution.

Add a parameter

We run validations upon creation of query parameters such as not allowing duplicate parameter names or empty names. More details here.

Constants

Constants are static values set to a variable name that can be leveraged within your query. They remain the same for ALL executions.

Add a constant

Add a constant for milestone value

Filter

Drag columns from projection to filter panel.

Drag & drop properties from the projection into the filter panel. More details and video walkthrough here.

"Filter by" results in your query

You can quickly filter by returned results (row entries) post running a query. This will add a post filter to your query that you can then further customize if needed. More details and video walkthrough here.

Date Filter and Operations

Leverage >, >=, <, <=, is in, and is not in. More details here.

date filter

Type-ahead for filter

We support fuzzy search & type-ahead for filter and post-filter. More details and video walkthrough here.

Milestoning

Milestoning

Date Propagations for milestoned properties

Query supports propagations for milestoned properties. You can also overwrite default date parameter values for milestoned properties directly from the projection and filter panels or from Text Mode.

milestoning

Watermark

You can add a watermark to your query through the advanced options tab. If a watermark is present, a waterdrop icon will appear on the top left of your query and you can also edit your watermark by clicking that icon.

Watermark

Fetch Structure - Tabular Data Structure

Projection Columns

Aggregations for Enumeration values.

You can perform aggregation operations in the projection column on an enumeration value when creating your query in the Query Builder.

enumeration aggregation

Post Filter

You may add a filter that will be applied to your Tabular Data Structure Columns that were defined through the projection panel by adding a post-filter.

Post Filter Post Filter on aggregation OLAP with Post Filter

Type-ahead for post-filter

We support fuzzy search & type-ahead for filter and post-filter. More details and video walkthrough here.

OLAP

OLAP lets you add window columns to your query. See:

Create Simple OLAP OLAP Modal OLAP with Post Filter

Result Modifiers

Coming soon.

Fetch Structure - Graph Fetch

Coming soon.

Open an Existing Query

Coming soon.

Edit a Service Query

Coming soon.

Executing Queries

Query Data as of Specific Dates and Times

Query Builder supports filtering by additional date and time values. These include now(), today (), and customized absolute date & time values. Additional, date and time values can be used for filters, post filters, parameters and derived properties.

datefilter

Apply operations, transformations, and calculations to your datasets in the Query Editor

The Query Editor supports performing aggregation functions as part of your query.

aggregation in query

Execute With Parameters

Execute Params Export Params With Enums

Cancel queries while running.

You can cancel queries while they're running in the Query Builder as well as in the Service & Mapping Editor. More details and video walkthrough here.

Running and exporting invalid queries

It is not allowed to run or export queries that are invalid - such as when no properties or duplicate properties are selected. More details and video walkthrough here.

Export Data

Once you are content with your data, you can also export to other types. For now we support exporting your query results to CSV.

Export CSV

Export CSV

Promote an ad-hoc query to a service

You can promote an ad-hoc query to a service.

More details and video walkthrough here.

More