Skip to main content

Query Data (Action Flow)

The Query Data Action Flow module allows you to query parts of your data model and provides the respective columns as output, which can be used in the next steps.

  • To query data from an augmented attribute, use the Get Rows module.

  • 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.

  1. Go to the edit mode.

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

  3. Search for Celonis.

  4. Select Query Data.

    Add new Action Flow module icon with a sample list of available modules.
  5. Select the connection type you want to use for your module. Choose from the following:

    • Celonis user - this connection type will reflect your existing data permissions and allow you to query data to which you already have access.

      Note

      You must have Data integration service permission to use this connection method. See Data Integration permissions.

      1. Give your connection a name.

      2. Click Save.

    • Celonis Application Key -This connection type will reflect the data permissions granted to the selected Application Key and allow you to query data to which you may not otherwise have access.

      1. Give your connection a name.

      2. In a separate window, create an application key and copy it. See Application keys.

      3. Paste the application key and click Save.

    • Celonis OAuth Client Credentials this connection type will reflect the data permissions granted to the selected OAuth app and allow you to query data to which you may not otherwise have access.

      1. Give your connection a name.

      2. In a separate window, create the OAuth application application Client ID and Secret and copy it. See Adding OAuth client to Celonis Platform.

      3. Paste the Client ID and Secret here and Save.

  6. Select the Data Pool which contains your Data Model.

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

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

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

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

    • 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).

  9. Add data filtering. Click Create Filter.

    Add filter context menu in an Action Flow module.

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

    Repeat the process to add more filters.

  10. (optional) Add Advanced Settings (see Advanced settings) or click OK to finish.

  11. Deploy your changes to make the module operational.

  12. To make the queried columns available in subsequent actions, please run the module once.

    Context menu for an Action Flow module with "Run this module only" setting selected.

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.

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.

Related topics