Skip to main content
The Query Result To Scalar orchestration component allows you to query a table and return a scalar value. This value can then be mapped to a project or pipeline variable for use in other pipeline components. This component is the scalar equivalent of the Query Result To Grid component.

Properties

string
required
A human-readable name for the component.
drop-down
required
  • Basic: This mode will build a query for you using settings from the Data Source, Data Selection, and Data Source Filter parameters. In most cases, this mode will be sufficient.
  • Advanced: This mode will require you to write an SQL-like query to call data from Snowflake. The available fields and their descriptions are documented in the data model.
string
required
The Snowflake database. The special value [Environment Default] uses the database defined in the environment. Read Databases, Tables and Views - Overview to learn more.
drop-down
required
The Snowflake schema. The special value [Environment Default] uses the schema defined in the environment. Read Database, Schema, and Share DDL to learn more.
string
required
The name of the table to be queried.
object selector
required
Select columns to return from the table.
object selector
Select columns to sort rows by. When sorting rows by multiple columns, sorting is applied in the order you select the columns. The sort order is shown in this property when you finish selecting columns.
drop-down
required
Select whether rows are sorted in Ascending or Descending order.
integer
required
Set the limit of returned rows.
column editor
  • Input Column Name: Select an input column. The available input columns vary depending upon the data source.
  • Qualifier:
    • Is: Compares the column to the value using the comparator.
    • Not: Reverses the effect of the comparison, so “Equals” becomes “Not equals”, “Less than” becomes “Greater than or equal to”, etc.
  • Comparator: Choose a method of comparing the column to the value. Possible comparators include: “Equal to”, “Greater than”, “Less than”, “Greater than or equal to”, “Less than or equal to”, “Like”, “Null”. “Equal to” can match exact strings and numeric values, while other comparators, such as “Greater than” and “Less than”, will work only with numerics. The “Like” operator allows the wildcard character % to be used at the start and end of a string value to match a column. The Null operator matches only null values, ignoring whatever the value is set to. Not all data sources support all comparators, meaning that it is likely that only a subset of the above comparators will be available to choose from.
  • Value: The value to be compared.
To use grid variables, select the Use Grid Variable checkbox at the bottom of the Filter Conditions dialog.
drop-down
required
Select whether to use the defined filters in combination with one another according to either And or Or.
code editor
required
This property opens an editor. On the left, users can explore tables and their metadata from environments. Both project and pipeline 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.This property is only available when Mode is set to Advanced.
Do not end SQL statements with a semicolon in this component.
column editor
required
Scalar results from the SQL query can be mapped to project and pipeline variables.Use the Input Column Name drop-down to select a scalar returned by the query. Use the Scalar Variable Name drop-down to select a variable to map the scalar to. Click + to add more mappings.
Variables used in the mapping must be created before this component runs. Read Project and pipeline variables for details of how to create variables.
To use grid variables, select the Use Grid Variable checkbox at the bottom of the Scalar Variable Mapping dialog.