Looking for the previous version? View v2024.06 documentation →
Filter Data using Variables in a Query Chain
Overview
A Query Chain (QC) is a multi-step data pipeline built on the Query Studio canvas. It connects data source widgets (RDBMS, Query, REST API, CSV, etc.) through transformation widgets (Filter, Aggregation, Join, Pivot, Unpivot, Projection) to an RD Output or file export. Query Chains can be scheduled, emailed, and reused as inputs to scenarios.
Prerequisites
- You are logged in to Data Trust with a Pro-User or Admin Pro-User role.
- At least one connection profile and one saved query are available in the system.
Steps
Path: Data Trust › Query Studio › Filter Data using Variables in a Query Chain
Navigate to the Query Studio module and select Query Studio_Query Builder_Query Chain to open the Query Builder workspace. This is the starting point for creating, editing, and managing queries in Data Trust.
The Query Chain create page is the main workspace for building and editing queries. Use the canvas to write SQL, add data sources, connect transformations, and configure output options.
This step shows Read data from table widget in the Filter Data using Variables in a Query Chain workflow. Follow the on-screen prompts to complete this configuration step before proceeding to the next stage.
This step shows Read data from table_popup window in the Filter Data using Variables in a Query Chain workflow. Follow the on-screen prompts to complete this configuration step before proceeding to the next stage.
Select the appropriate connection profile from the dropdown to link the query to its data source. Choosing the correct profile ensures the query reads from the intended database or system.
The Navigator panel displays the available databases, schemas, and tables for the selected connection. Expand the tree to locate the required table, then click Select to add it to the query.
This step shows Click is_orders table_Click Select button in the Filter Data using Variables in a Query Chain workflow. Follow the on-screen prompts to complete this configuration step before proceeding to the next stage.
The Transformations tab lists all available data transformation widgets — Filter, Projection, Aggregation, Join, Pivot, Unpivot, and more. Drag the required transformation onto the canvas and connect it between the data source and output widgets.
The Filter transformation restricts the records passing through the Query Chain to only those matching the specified conditions. Define the filter expression using field dropdowns, operator selectors, and value inputs, then save the widget.
The Filter transformation restricts the records passing through the Query Chain to only those matching the specified conditions. Define the filter expression using field dropdowns, operator selectors, and value inputs, then save the widget.
Drag the The Available Fields And Available Operators_Employeeid_Equals To widget from the palette and drop it onto the Query Chain canvas. Once placed, click the widget to open its configuration popup and complete the required settings.
The Variables panel lists all predefined system variables and user-defined variables available for use in queries. Select a variable to insert it into the query expression, making the query dynamic and reusable across executions.
This step shows Select the checkbox_USR_employeeid_Click the Test Result in the Filter Data using Variables in a Query Chain workflow. Follow the on-screen prompts to complete this configuration step before proceeding to the next stage.
The Variables panel lists all predefined system variables and user-defined variables available for use in queries. Select a variable to insert it into the query expression, making the query dynamic and reusable across executions.
Click Save to persist the query or configuration to the Query Explorer. A confirmation message appears once the save completes, and the query is available for reuse in Query Chains and scenarios.
The RD Output widget captures the final result set from the Query Chain for use in downstream processes. Configure the output name and format, then save the widget to make the results accessible to other scenarios and reports.
Drag the _Rd Output Icon widget from the palette and drop it onto the Query Chain canvas. Once placed, click the widget to open its configuration popup and complete the required settings.
The RD Output widget captures the final result set from the Query Chain for use in downstream processes. Configure the output name and format, then save the widget to make the results accessible to other scenarios and reports.
Click Execute Now to run the query immediately and fetch the result set. The results appear in the Results tab, and the execution status is displayed in the progress indicator.
The RD Output widget captures the final result set from the Query Chain for use in downstream processes. Configure the output name and format, then save the widget to make the results accessible to other scenarios and reports.
The Variables panel lists all predefined system variables and user-defined variables available for use in queries. Select a variable to insert it into the query expression, making the query dynamic and reusable across executions.