Query Chain Execution Using Gen AI Transformation
Overview
This feature lets you transform data using plain-English prompts instead of writing code. You describe what you want (or pick an AI suggestion), and DataTrust generates the code for you.
This guide shows how to add a Gen AI transformation to a Query Chain and run it.
Building the Query Chain Source
Figure 1:
Opening the Query Chain builder from Query Studio in the DataTrust Query Explorer.
Figure 2:
New Query Chain session on the Data Sources tab with an empty canvas.
Figure 3:
Dragging the RDBMS Table icon onto the canvas adds an unconfigured 'Read data from Table' widget.
Figure 4:
The empty 'Read data from Table' configuration pop-up for the RDBMS Table widget.
Figure 5:
Selecting MSSQL as Database Type and MSSQL JDBC as Connection Name, then opening the table navigator.
Figure 6:
Selecting the ORDERS table in the Navigator panel populates Pick Table with its 11 columns.
Figure 7:
After saving the RDBMS widget, opening the Transformations tab which includes the Gen AI option.
Adding a Gen AI Transformation Using Templates
Figure 8:
Dragging the Gen AI widget onto the canvas adds a transform node after the RDBMS widget.
Figure 9:
Opening the Gen AI Transform Configuration pop-up, defaulting to the Input Metadata tab with generic templates.
Figure 10:
The Preview Input Data tab showing a 100-row sample of the source ORDERS data.
Figure 11:
Selecting the generic 'Standardize date columns to DD/MM/YYYY format' prompt populates the Describe Your Transformation box.
Figure 12:
Clicking Generate Code produces AI-generated Python transformation code with a SQL Pushdown badge.
Figure 13:
Clicking Copy on the Generated Code tab copies the Python code to the clipboard.
Figure 14:
Clicking Download saves the generated code as a Python file, 'generated_transformation (6).py'.
Figure 15:
The downloaded code opened in an editor, showing the date-formatting SELECT statement it generated.
Figure 16:
Clicking Run with Sample Data tests the generated transformation using the connection_string call.
Figure 17:
The Preview Output tab showing 100 transformed rows with the resulting output columns.
Figure 18:
The Output Metadata tab, where output columns can be included, reordered, and saved.
Figure 19:
Clicking Save Configuration saves the transformation and returns to the Query Chain session.
Adding a Gen AI Transformation Using AI Suggestions
Figure 20:
Reopening the Gen AI widget to explore the AI Suggestions feature on Input Metadata.
Figure 21:
Clicking the AI Suggestions tab to request data-aware prompt suggestions for the ORDERS input.
Figure 22:
Smart AI suggestions generated for the input data, listed under Data Profiling & Summary Statistics.
Figure 23:
Selecting an AI suggestion appends it into the Describe Your Transformation prompt box.
Figure 24:
Clicking Generate Code for the AI-suggested prompt produces Python code with SQL Pushdown.
Figure 25:
Clicking Run with Sample Data executes the AI-suggested transformation against the sample rows.
Figure 26:
The Preview Output tab after running the AI-suggested transformation, showing 100 transformed rows.
Figure 27:
The Output Metadata tab reviewing output column configuration for the AI-suggested transformation.
Figure 28:
Clicking Save Configuration persists the AI-suggested Gen AI transformation.
Figure 29:
The Gen AI widget saves and closes, returning to the Query Chain session page.
Adding Output and Executing the Query Chain
Figure 30:
Opening the Output tab to add a destination for the transformed data.
Figure 31:
Dragging the RD Output icon onto the canvas adds an unconfigured output widget to the chain.
Figure 32:
The RD Output configuration pop-up, setting the database, table, and output columns before clicking Select.
Figure 33:
After saving the RD Output widget, clicking Execute to run the full Query Chain.
Figure 34:
The Query Chain executing successfully in monitor mode, with a 1,500,000 record count per widget.
Figure 35:
The Results tab showing output data with O_ORDERDATE standardized to DD/MM/YYYY format.