Skip to main content
Version: Current

Execute Query

Description

The Execute Query activity executes a raw SQL query against a connected database and returns the resulting records as a DataTable.

It is primarily intended for advanced data retrieval scenarios where you need to execute custom SELECT queries, such as queries involving joins, subqueries, aggregations, Common Table Expressions (CTEs), or other database-specific SQL constructs.


Common Capabilities

Process Data Support

info

This activity supports dynamic configuration using variables from the Process Data drawer.

You can bind values from Model Data, Form Data, System Data, Enterprise Variables, and Activity Outputs.

Learn more → Using Process Data


Design-Time Configuration

The following properties define how the activity connects to the database and executes the SQL query.

Connection Type

Specifies the database engine (for example, SQL Server, Oracle, MySQL, PostgreSQL). Selecting the correct type ensures compatibility with the target database.

Connection Name

Select a preconfigured database connection that defines the server, credentials, and security settings.


Query

Specifies the raw SQL query to be executed.

The query must be valid for the selected database engine and should return a result set.

Use this property to define custom SELECT queries, including complex queries involving:

  • Joins
  • Subqueries
  • Aggregations and grouping
  • Common Table Expressions (CTEs)
  • Database-specific SQL functions and expressions
note

The Execute Query activity is intended for retrieving data. Use the appropriate database activities for INSERT, UPDATE, and DELETE operations.


Timeout

Specifies the maximum time (in seconds) that the activity will wait for the query to complete.

The default value is 600 seconds.


Outputs

DataTable

Returns an IbDataTable containing the result set produced by the SQL query.

Each row in the query result is represented as a row in the DataTable, with columns corresponding to the fields returned by the query.

If the query does not return any records, the DataTable will contain no rows.


Wait All Incoming

Execution Control

Controls how this activity behaves when multiple incoming execution paths converge.

Determines whether the activity executes when:

  • any incoming path completes, or
  • all relevant paths have completed before execution

Learn more → Execution Control


On Error

Error Handling Strategy

Defines how the workflow behaves if this activity encounters a runtime error.

Supported strategies include Fault, Continue, Suspend, and Retry.

Learn more → Error Handling