Steps to Add Custom Attribute in Query: With and without Alias Name
Steps to add the attribute in the custom query:
Consider you have created a custom attribute to filter the ‘CustomerID’ from the data
The custom attribute can be used in custom query by manually providing the required custom attribute name in code view using syntax.
${{:attribute_name}}
You can use this custom attribute in the custom query as follows:
Extract Mode:
In the extract mode data source, each data source will have a unique identifier in the column name. To ensure that your custom attribute is widely used across multiple data sources with the same field name, it is advisable to use a common name like an Alias name.
Typically, field aliases cannot be used in the WHERE clause due to the order of operations in the SELECT statement. However, you can incorporate the Alias name in the WHERE condition by utilizing a Subquery.
Live Mode:
In live mode, the GUID will not be generated. Instead, only the column name will be included in the custom query. As a result, you can use the column name or alias directly.
Using Column Name:
Example 1:
"Orders"."EmployeeID" = 2
Example 2:
"Orders"."CustomerID"='HANAR'
Using Alias Name:
"CustomerID"='HANAR'