Query
Run a SQL query to transform data.
The Data Query step lets you execute a SQL query to fetch, filter, or transform your input data. Use this step to:
- Enrich data: Join your input data with additional tables to add extra context.
- Refetch information: Retrieve the most up-to-date data after a Wait step.
- Filter rows: Apply custom conditions to include or exclude specific records.
- Fan-out: Expand a single trigger event into multiple notifications by transforming the input row into multiple rows.
To add a Data Query step, click the ”+” placeholder node in the builder or the ”+” button on any connection between two steps, then select Data Query.
Configuration of a Data Query step that enriches user data by joining with the organization table.
Breakdown
Select a database connection
Choose the database connection through which the query will be executed. This connection must be configured in your settings.
Write your SQL query
Enter a SQL statement that processes the data from the parent step. You can access the input data via a temporary table called input_rows
in addition to the tables from the database connection you selected.
The query editor supports SQL syntax highlighting, auto-completion, and a built-in formatter.
Add a description (optional)
Provide a brief description to easily identify this step within your workflow.
Test the query output
Use the Test Panel to preview outputs and validate your query. This ensures that the data passed on to subsequent steps meets your requirements.
Explore further
Was this page helpful?