For most use cases, consider using parametrized queries with
$1, $2, … placeholders instead. They provide a simpler syntax, prevent SQL injection, and are supported across all Firebolt SDKs and drivers.TEXT.
Syntax
Return Type
TEXT
Specifying query parameters
To use thePARAM function, you need to define query parameters using the SET query_parameters command.
The function relies on a request property named query_parameters in JSON format. Use the following schema:
Example
The following example shows how to use a Common Table Expression (CTE), through aWITH clause, to generate input data and apply a query parameter in a computation.
The WITH clause defines a temporary dataset, and the query evaluates whether each row matches the parameter value using PARAM.