Skip to main content

Celonis Product Documentation

Query Data

Queries parts of your data model and provides the respective columns as output which can be used in the next steps.

Note

The Get Rows module is a newer version of this functionality and we recommend using that module instead of Query Data.

The capabilities of Get Rows include everything that can be achieved with Query Data. Additionally, Get Rows allows you to query not only from the Data Model, but also from the Knowledge Model such that records, attributes, and filters in the Knowledge Model can be referenced directly and easily. This makes automation with Action Flows easier to maintain since the knowledge is stored centrally in the Knowledge Model.

Getting Started
  1. Go to the edit mode.

  2. Click on the '+' icon to add a new action.

  3. Search for Celonis.

  4. Select Query Data.

    50746256.png
  5. Add a Connection by clicking Add in the Query Data action. Now you have two possibilities. You can either just move forward by pressing the Continue button, establishing a "Celonis User Connection" or selecting the "Celonis App Key Connection" from the Connection type dropdown.

    Tip

    For creating and testing an Action Flow, the "Celonis User Connection" might be the fastest and easiest choice to get started.

    For unattended full automation use cases we recommend switching to the "Celonis App Key Connection". This ensures that the automation runs stable even if a specific user is removed from the team.

    60363294.png

    Choose which kind of Connection you would like to add:

    Establish a "Celonis User Connection":

    50746274.png

    If you choose the "Celonis User Connection" you can directly press the Continue button to move the process forward. A new window will open up which has to be closed.

    After that step you can move on with the settings of the Celonis Query Data setup.

    Scroll down to Step 6

    Establish a "Celonis App Key Connection":

    50746273.png

    5.1 When 'Show advanced settings' is selected, a Connection type dropdown is shown where you can change the default connection type from "Celonis User Connection" to "Celonis App Key Connection".

    50746259.png
    50746261.png

    When selecting the "Celonis App Key Connection" you have to provide an Application Key.

    5.2 Create an application key and copy it.

    5.3 Come back to this Connection pop up and paste the key in the respective field (Application Key). Move on by pressing the Continue button.

    50746264.png

    5.4 Navigate to Data Integration, click the three dots and go to Permissions in the Data Pool you're planning to use.

    50726087.png

    5.5 Select 'USE ALL DATA MODELS' for the application key you created.

    50746287.png
  6. Go back to the Query Data Model Action in your Action Flow and select the Data Pool which contains your Data Model.

  7. Choose your Data Model in the dropdown menu that appears after step 5.

    60363305.png
  8. Add the columns you wish to query. This can be done by writing a PQL expression. Each column has three fillable fields:

    1. Column Name- the name that will be used when displaying that column's outputs.

    2. Formula - the PQL query used to extract that column (e.g. "VBAK"."VKORG")

    3. Column Sorting - defines the direction in which the output of this column will be returned. There are three discrete options from which you can choose.

      1. None (default): No sorting will be applied when querying results.

      2. Ascending: Results will be returned in ascending order.

      3. Descending: Results will be returned in descending order.

    Note

    The sorting priority will be defined according to the order of columns in the columns array.

    Tip

    We recommend starting with a Studio Analysis from which you can then copy the PQL queries over to the Query Data action. When pasting PQL into the Query Data action please use the 'paste without formatting' option (Ctrl+Shift+V).

    60363306.png

    Warning

    Those Query Data Actions created before January 19th 2022 will not have column sorting enabled. To make use of this feature, please replace your existing Query Data Action with a new (V.3) Query Data Action.

  9. Add filter

    In the Filter option, you can define filters using PQL.

    Open the Create Filter setup

    50746280.png

    Choose a name, define the filter and add the filter to the setup

    50746281.png

    Repeat the process to add more filters

    50746282.png
Advanced Settings

If you tick the Show advanced settings box, you can additionally adjust the Row Limit property.

Property

Description

Row Limit

The setting Row Limit allows you to adjust the number of rows to be queried. Per default, this is 50 per execution cycle.

Important

To avoid performance issues with Action Flows, the row limit in the Query Data module should not exceed 50000.

Use the Queried Data in Action Flows

Note

In order to make the queried columns available in subsequent actions, please run the module once.

50733874.png

Finally, you're all set to use your defined columns in subsequent actions. They will be listed just like parameters from other actions. In the example on the right, we're accessing our columns 'Sales Order' and 'Requested Delivery' (these were the alias we chose) to send a message in Slack.

50746532.png

Note

You not only have the option to access the columns you defined but also the total number of bundles as well as the position of a bundle order!

Hints and tips

Here are some issues that we've noticed:

  • You can't use this module to query data from an augmented attribute. Please use the Get Rows module instead.

  • Make sure that you publish any Action Flows and Knowledge Models that you're using. You cannot run queries using Action Flows and Knowledge Models that are in draft mode.