Manage Scenario Export¶
The Manage Scenario Export page allows you to administer export sets – a list of information that specifies what should be exported from the aPriori operational database, and when. In addition to managing schedules, you can also manage the cleaning (purging) of exported data and view the history of exports that have been run.
Important:
Before you can export scenarios from the aPriori operational database to the aP Analytics reporting database, you must ensure that the target components have been successfully costed (initialized). If a part is opened in aPriori, but is not initialized, Scenario Export will export it to the reporting database as an uninitialized part (that is, the “costed” field in the “scenario_facts_base” table is set to “uncosted” for this part). If a part was recently re-costed, but not saved in the database, the exported data will not be up to date.
Export sets reference the component, assembly, or roll-up in the aPriori operational database that you want to transfer to the reporting database. You define the schedule for when the export(s) should happen. Typically, export sets reference a roll-up or assembly of components that form a unit that you want to report or query against to provide business insights. For example, you might want to track cost trends for parts that are being changed as part of a redesign project. You can export specific scenarios which capture the data that you are interested in.
All vs All Delta exports¶
Scenario Export provides pre-defined Export Scope options All and All Delta so that you can easily export all scenarios in a single step. For smaller databases (for example, with fewer than 100,000 components) you could probably use the All option whenever you need to do a complete export. For larger databases, an All export might take a long time, so we also provide an All Delta option. In this situation, you could schedule All scenarios from a component schema to be exported once a week during a period of low activity, and then schedule daily All Delta exports to incrementally update the scenarios that have changed in the previous 24 hours. Report writers can take advantage of a new Reporting database view named “all_latest_scenarios” which merges the “all export” event with all of the relevant “all delta export” events to provide an easy way to see the latest version of each scenario defined in the reporting database.
It is very important to carefully coordinate All Delta schedules with any Scenario Synchronization schedule (see Scenario Synchronization (On-Premise Only)), otherwise it possible to miss some scenarios that you might assume will be picked up by the delta.
Here is an example of how scenarios could get skipped with jobs that are not well coordinated:
- A Scenario Sync job runs, and all imported scenarios have a last saved date 2018-01-16.
- The last Export All Delta job was run on 2018-01-17.
- The next All Delta job runs on 2018-01-19. This job searches for scenarios saved after 2018-01-17 (the date of the previous “All Delta” run). This ignores 200 scenarios saved on 2018-01-16 which were added by the Scenario Sync job in #1 above.
- The next time an All export job runs (not All Delta), it picks up the 200 scenarios which were imported by Scenario Sync.
Rules for overwriting scenarios¶
- Scenarios are considered unique through a natural key defined as “part_number”, “scenario_name”, “scenario_type”, and “component_schema_name”.
- When evaluating two component scenarios with the same natural key, the one with the later timestamp will overwrite the other. An import never overwrites an existing newer scenario, even in the case where a scenario is nested within an assembly that is being imported.