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 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
This example creates a parametric column, which groups the customers into two bins, customers from Los Angeles, and customers with an income greater than $100K.
1 Choose “New” in the Transform tab. The list of transformation instructions appears.
2 In the list of transformation instructions, choose PARAMETRIC to open the Parametric screen shown in Figure 5‑22.
Figure 5‑22 Creating a parametric column
3 In the Table fields, select the target database and table.
4 In the Column field, type the name of the new column.
5 Define a new bin.
1 Click on “Add new bin” in the Bins field to expand it to include the Label and Domain fields.
2 In the Label field, type the name of the new bin, for example Customers from CA.
3 Click on the Domain field to open the Domain definition screen, as shown in Figure 5‑23.
Figure 5‑23 Creating the Customers Los Angeles domain
4 In the Domain definition screen, define the query and choose “OK”.
5 Back in the Parametric screen, choose “Add new bin” again, to define another bin.
6 Define a label for the domain, and select the Domain field to define the query. The Domain definition screen appears again, as shown in Figure 5‑24.
Figure 5‑24 Creating the CreditLimit domain
7 Choose “OK” in the Domain definition screen to return to the Parametric screen.
6 Now choose “OK” in the Parametric screen to go back to the main Transform tab screen, The Parametric instruction appears in the Main file panel
7 Save the project.
8 Run the instruction without loading data.
1 In the Main file panel, select each instruction. Then choose (- )to make them inactive, as shown in Figure 5‑25.
2 In Data—Options, remove the selection for Load box, as shown in Figure 5‑25.
Figure 5‑25 Removing the Load option
3 Choose Run. As the project runs, messages describing each stage of the project appear in Running project, as shown in Figure 5‑26.
Figure 5‑26 Running a Parametric instruction
9 Verify that the new column was created in Explorer in Data Management.