In this article
...
Use this Snap to add a WHERE clause in your SQL query. The WHERE clause is used to create filters/conditions. The Snap can also be used an an equivalent of a HAVING clause in the context of aggregate operations. This Snap also allows you to preview the result of the output query. You can validate the modified query using this preview functionality.
Prerequisites
None.
Limitation
...
Info | ||
---|---|---|
| ||
You can use the SQL Expressions and Functions supported for ELT to define your Snap or Account settings with the Expression symbol = enabled, where available. This list is common to all target CDWs supported. You can also use other expressions/functions that your target CDW supports. |
...
Parameter Name | Data Type | Description | Default Value | Example | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Label | String |
| ELT Filter | GRADE_RECORD | ||||||||
ELT Filter | String | Required. The condition for the WHERE clause. You can also use Pipeline parameters in this field to bind values. However, you must be careful to avoid SQL injection. See Preventing SQL Injection for details. | N/A | GRADE = 1 GENDER = 'MALE' | ||||||||
Get preview data | Check box |
| Not selected | Selected |
...
Method-2: Dynamic Substitutions
You must enable expressions when using Pipeline parameters for dynamic substitutions. Format the SQL expression, except the Pipeline parameter's reference, as a string.
For example, if you want to use the Pipeline parameter, name, which contains the value of a column in the ELT Filter field:
...
Note | ||
---|---|---|
| ||
When expressions are disabled, use \ as an escape character to treat underscore (_) as a string. For example:
|
Troubleshooting
...
Error | Reason | Resolution |
---|---|---|
Syntax error when database/schema/table name contains a hyphen (-) such as in (CDW: Azure Synapse) | Azure Synapse expects any object name containing hyphens to be enclosed between double quotes as in "<object-name>" . | Ensure that you use double quotes for every object name that contains a hyphen when your target database is Azure Synapse. For example: default."schema-1"."order-details" . |
Examples
Multiexcerpt include macro | ||||
---|---|---|---|---|
|
...