PARAMETRIC
Parametric columns consist of query-based values. These queries are formulated with values or columns belonging to any table in the database as long as the tables are properly joined. The resulting dynamic column is created in the table indicated during the process, so the results are very different depending on the resolution marked by the selected table.
For example, in the Demo database, you can determine sales of a particular product. For the Customers table, the query returns the number of customers who bought one or more quantities of the product, while for the Products table the query returns how many X products have been sold. The number of products sold is probably greater than the number of customers who have bought them, because one customer may buy more than one unit of a product, but one unit of a product cannot be sold to more than one customer.
A parametric column is not displayed in the data explorer, since the same record may meet the condition of several values in the parametric column.
A Parametric instruction must have the following syntax:
Syntax
PARAMETRIC [Target table] [Target column] [Bins]
Parameters
Target table
Defines a database, and table.
Target column
Defines the name of the target column.
Bins
A set of data values that fall in a given interval. Define a bin name and a query that fills the bin with data. To define the query, use Domain.
How to create a parametric column
The example creates a parametric column, which groups the customers into two bins, customers from California, and customers with credit limit greater than $100K.
1 In Main file, choose New. The list of transformation instructions appears.
2 In the list of transformation instructions, choose Parametric. Parametric appears, as shown in Figure 5‑24.
Figure 5‑24 Creating a parametric column
3 In Table, select the target database and table.
4 In Column, type the name of the new column.
5 Define a new bin.
1 In Bins, select Add new bin. The new bin definition appears.
2 In Label, type the name of the new bin, for example Customers from CA.
3 Choose Domain to define the query. Domain definition appears, as shown in Figure 5‑25.
Figure 5‑25 Creating the CustomersCA domain
4 In Domain definition, define the query and choose OK.
5 In Parametric, choose Add new bin again, to define another bin.
6 Define a label for the domain, and choose Domain to define the query. Domain definition appears again, as shown in Figure 5‑26.
Figure 5‑26 Creating the CreditLimit domain
7 In Domain definition, choose OK.
6 In Parametric, choose OK. The Parametric instruction appears, as shown in Figure 5‑27.
Figure 5‑27 Creating a Parametric instruction
7 Choose Save, to save the project.
8 Run the instruction.
1 In Main file, select each instruction and then, choose - to make it inactive, as shown in Figure 5‑21.
2 In Data—Options, deselect Load, as shown in Figure 5‑28.
Figure 5‑28 Deselecting Load
3 Choose Run. As the project runs, messages describing each stage of the project appear in Running project, as shown in Figure 5‑29.
Figure 5‑29 Running a Parametric instruction
9 Validate that the new column was created in Explorer in Data Management.