Pricefx Classic UI is no longer supported. It has been replaced by Pricefx Unity UI.
Â
Logic Test Drive in Analytics
While developing a calculation logic in Analytics, it is handy to test it using real data. You can do so with Logic Test Drive which works with Data Feeds, Data Sources or Datamarts. The test runs with the currently opened logic and so you can finetune it before saving it.
Logic Test Drive can be accessed from each element but it always runs the whole calculation logic.
To set up Logic Test Drive:
- Click the Logic Test Drive  icon.
- The Logic Test Drive wizard opens.Â
- Step 1 – Select the test items. As the data volumes in Analytics are large, it is expected that for the test you select only some items.
- Select either Data Feeds, Data Sources or Datamarts using the Change Context button at the top right.
- Select the specific data object to in the drop-down menu.
- Select the specific rows to test.
- Step 2 – Get parameters. Here you specify parameters that are used during the run of the logic.
Note that the Calculation Data Load logic is executed once at the beginning ("Init" step), for each row ("Row" steps) and at the end ("Summary" step). The following parameters might be required:- Target Date – Target date for the whole execution.
- Target Date Field – Row's column name that contains the target date to be used for the row calculation.
- SKU Mapping – Row's column name that contains SKU (Product) ID which is passed to the calculation logic.
- Additionally, all user entries found in the logic can be set, so that "Init" and "Summary" steps receive the required parameters and "Row" steps can receive a fixed parameter which will overwrite the column value of the row being processed.
- Step 3 – Calculate. When you click the Calculate button, the calculation logic is executed with the selected rows and parameters. When finished, the results are presented in the window. As the same logic is executed multiple times, you can select the particular step ("Init", "Row 1", "Row 2" ... "Summary") in the drop-down menu to see the results. For the row steps, there is an extra "_ROW_" element to indicate what row was processed (for other computed elements there are simply logic trace details instead).
- Step 1 – Select the test items. As the data volumes in Analytics are large, it is expected that for the test you select only some items.
Within the user session, Logic Test Drive remembers the last entered inputs and parameters and so when you run the test, spot some issues and change the logic, you can open Logic Test Drive and go directly to Step 3 Calculate. It will keep the same setting as in the last run and you can test your logic quicker.
Found an issue in documentation? Write to us.
Â