You are viewing archived documentation for Data Trust v2024.06 (previous version).
Go to the latest v7.6 documentation →
Go to the latest v7.6 documentation →
Filter data using variables in Query Chain
Users can use any variable and execute data using Filter transformation in Query Chain. Let’s execute a Query Chain using Filter transformation with a variable combination.
To learn more, let us walk through the below procedure:
- Click the ‘Query Studio’ module.
- Hover on the ‘Query Builder’ snippet.
- Click the ‘Query Chain’ option.
- The user is navigated to the new Query Chain session page.
- From the ‘Data Source’ tab, let’s drag and drop an ‘RDBMS Table’ icon onto Query Chain create and edit page.
Note: All other Data Source icons including ‘RDBMS Table’ gets disabled as the user drags it onto Query Chain session page.
- Double tap the ‘Read data from Table’ widget.
- A ‘Read data from table’ pop-up window is displayed.
- Let’s select ‘Postgre SQL’ from ‘Database Type’ drop-down list and ‘PostgreSQL Northwind-QA_AWS’ from ‘Connection Name’ drop-down list.
- Click the ‘Navigator’ button.
- A ‘Navigator’ slide screen is displayed on the right side of the page.
- Let’s select the ‘Orders’ table from the ‘Public’ schema.
- Click the ‘Orders’ table to pick the table.
- Click the ‘Select’ button.
- This action saves the ‘RDBMS table’ widget data by closing it.
- The user is navigated to the Query Chain session page.
- Click the ‘Transformations’ tab.
- Let’s drag and drop ‘Filters’ icon onto the Query Chain session page.
- Double tap the ‘Filter data from <Data Source>’ widget.
- A ‘Filter data from Data Source’ pop-up window is displayed.
- Let’s drag the ‘Available Fields’ and ‘Available Operators.’
- Select ‘employeeid’ column as drop-down list for ‘Available Fields.’
- Select ‘Equals to’ operator as drop-down list for ‘Available Operators.’
- Now, drag the ‘Variable’ icon ($$).
- This action pops up the ‘Variables’ window.
Note: By default, ‘Predefined variables’ tab is selected.
- Click the ‘User defined variables’ tab.
- Let’s select and checkbox ‘USR_employeeid.’
- Click the ‘Test Result.’
- This action loads the variable (3) under the ‘Result’ field.
- Click the ‘Ok’ button.
- This action navigates the user to the ‘Filter data from Data Source’ pop-up window.
- The variable (USR_employeeid) is added under the ‘input’ field.
- The user can also view the Expression under the ‘Expression’ field.
- Click the ‘Save’ button.
- This action closes the ‘Filter’ widget saving its data.
- The user is navigated to the ‘Query Chain’ session page.
- Click the ‘Output’ tab.
- Let’s drag and drop an ‘RD Output’ icon.
- Double tap the ‘RD Output’ widget.
- An ‘RD Output’ pop-up window is displayed.
- Click the ‘Select’ button.
- This action closes the ‘RD Output’ widget saving its data.
- Click the ‘Execute Now’ button.
- A green color tick mark indicates the Query Chain is executed successfully.
- A monitor mode is enabled.
- Let’s click on the ‘RD Output’ count icon (127).
- This action navigates the user to the ‘Results’ tab displaying the executed Filter data using variables.