Using functions in an attribute form
When defining an attribute form, we're not limited to column names: as said, we can use constants or choose from a huge list of functions ready to use. These functions are meant for the most common uses: arithmetic, date manipulation, string functions to name a few. Let's see an example with the Customer attribute.
Getting ready
We are going to use the DimCustomer
table for the next recipe. This table has a primary key (CustomerKey
) and two description fields (FirstName
and LastName
).
How to do it...
Follow these steps to create a new attribute:
As in the previous recipe, go to the Attributes folder and right-click on the right pane.
Select New | Attribute from the context menu.
Create the ID form with the CustomerKey column of the DimCustomer table, set Mapping method to Manual, and click on OK.
In the Create New Attribute Form window, check only DimCustomer, which is bold, and click on OK.
In the Attribute Editor, click on the New button and you're again into...