Query Result To Scalar Component
Query Result To Scalar
TThe Query Result To Scalar component enables users to write any custom SQL Query that returns a scalar value. This value can then be mapped to an Environment or Job Variable to be easily used in other Matillion ETL functions.
This component is the scalar equivalent of the Query Result To Grid Component.
The table below cites the Query Result To Scalar component's setup properties and any actions required by the user.
|Name||String||Input the descriptive name for the component.|
|SQL Query||Editor||This property opens an editor. On the left, users can explore tables and their metadata from environments currently recognised by the Matillion ETL client. Both Environment and Job variables are also listed in the bottom-left.
SQL Queries can be written in the main panel and tested using the "Sample" button, which will display results below.
Note: Do not add a trailing semi colon [;] to your SQL query.
|Scalar Variable Mapping||Mapping||Scalar results from the SQL Query can be mapped to Environment and Job Variables.
Returned scalars are available from the "Input Column Name" dropdown, and can be mapped to an Environment or Job variable in the Scalar Variable Name.