- 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.
Create a query with your agent
Ask your connected agent to add a query. For example:After the wait, query the user’s current plan and continue only if they haven’t upgraded. Keep the change as a draft.You can also ask for an audience based on sends, opens, or clicks. Dreamlit supports your connected database and its own Email activity source. A query reads one source at a time; use separate steps to combine app data with email activity.
Dashboard alternative
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
Under Reads from, select Your database or Email activity. For your database, choose a connection configured in settings. Email activity reads Dreamlit-managed send and engagement data without a separate database connection.
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.Example
Example
Suppose the parent step returns user details with columns like In this query:
email and organization_id, and you want to bring in
the user’s organization name for a notification template. You can write a query to join these rows with an organization table to
enrich the data:- input_rows: Contains all data passed from the previous step.
- organization: The table in your database that contains the organization name.
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
How it works
Discover how Dreamlit executes your queries and manages data
transformations.
Publishing workflows
Learn how publishing your workflow activates the Data Query step and
finalizes its configuration.