Using the PQL editor
Note
You're currently viewing a topic describing a Studio feature that's in limited availability. For more information, see: Studio (new experience).
For all other Studio features, see: Studio.
The PQL editor enables you to translate process-related business questions into queries, which are then executed by a custom-built query engine. This editor can now be accessed directly from your view layout builder, helping you create detailed views with your data.
For more information about PQL, see: PQL - Process Query Language
Accessing the PQL editor from a view component
You can access the PQL editor using view components where data fields can be selected by either clicking the PQL editor button directly or when adding data to a setting (such as a table column):
PQL editor enhanced options
When using the PQL editor, you have the following enhanced options:
To assist you when writing PQL expressions, an interactive PQL reference library is available within the editor.
Click PQL Ref to browse the references and then click the syntax to add it to the current line in the editor.
You can also access inline PQL suggestions using CTRL + SPACE within the editor:
The data and variables displayed in the PQL editor are imported from Knowledge Models and package variables within the same package. They can be added to the PQL editor by clicking on them (adding them without any transformations) or you can click the + icon to apply aggregate functions to the data added.
The aggregate functions include: count, count distinct, min., max., and median.
When using the editor to create or edit PQL expressions, you are prompted to save the result as a metric to your knowledge model. This allows the metric to then be used and referenced in other assets using that knowledge model.
To save a metric to your Knowledge Model from within the editor, click Save to:
You're then in Knowledge Edit Mode, giving you the ability to edit the metadata associated with the new metric and, if necessary, the option to further edit the PQL expression.
Note that the new metric must have an ID before it can be saved and added to the Knowledge Model.
You can now execute PQL queries and see the live results within the table whenever changes are made.
Click Run PQL when prompted or use the keyboard shortcut CTRL + ENTER.
After executing the query, either the table will update with the results or you will be shown a PQL error message with further information.
In this example, there is a syntax error in line 1.
Quick filters and sorting
Click the filters icon to quickly filter your content based on data types and sources. You can also use this feature to manage how your data is sorted.
Custom formatting cheat sheet
When using custom formatting, a cheat sheet displays the options you have available for that data type: