Create a Dimension with Automatically Collected Values
This article outlines the process used to create a Dimension with values that are populated automatically using a data fetch command. While SQL specifically is used to fetch Dimension Values, the process described below can be used for any Configurable Data Source.
Before starting this process, you should have a SQL statement or other fetch command ready that returns two columns for the Dimension:
- Key Value (typically a code stored in the source database)
- Display Value (the phrase that appears on tiles and elements)
If you are defining a Child Dimension (Dimension with a Parent) or a Compound Dimension different columns are required. For more details, see:
1. Access Content > Dimensions > [+ New Dimension]
2. Enter Dimension Information
Provide the basic Dimension definition information, paying close attention to:
- Name: enter unique and descriptive phrase(s)
- Parent Dimension: chose an existing Dimension if the Dimension is to be a Child of another Dimension
- Dimension Key Values are: specify numeric or text, based on how the Dimension Value's key is defined in the source system
Value Source: from the drop-down list, select the method by which Dimension Values are to be collected
- In this example, select "Demo DB (SQL)" as the Value source
- Specify a Bind Parameter for the Dimension
- This entry must match the column name of the data in the source system to be used in the fetch command
- Save the select to create the Dimension
The Dimension Editor opens.
3. Create your Fetch Command
To define Dimension Values using SQL:
SQL Statement: Write the data fetch command to be used to collect the Dimension Value data.
- The command must return one Key value and one Descriptive value column.
- If the Dimension does not have a Key Value, select the descriptive value for both columns.
- Validate the command
4. Validation the Sample Dimension Values and Collect Values
- Upon successful validation, the sample collected Dimension Values will appear under the data fetch command field
- Click Collect values if the sample Dimension Values shown are as expected