Articles in this section
Category / Section

Steps to Add Custom Attribute in Query: With and without Alias Name

Published:

Steps to add the attribute in the custom query:

Consider you have created a custom attribute to filter the ‘CustomerID’ from the data

image.png

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.

image.png

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 

image.png

Example 2:
"Orders"."CustomerID"='HANAR' 

image.png

Using Alias Name:
"CustomerID"='HANAR'

image.png

Additional References

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
GR
Written by Gayathri Ravichandran
Updated
Comments
Please  to leave a comment
Access denied
Access denied