Demantra Engine Common Run Time Errors
By user702295 on May 02, 2012
Hello! These errors are common. Please take a minute to review. Regards!
* DP shapes are defined but seem to have no effect
1. Verify that the DP shape causals were defined on the relevant BATCH (or parent BATCH profile in case of simulation) and not only on profile 0. Profile 0 is only used as template when creating new profiles.
This is common for customers that upgraded from versions that did not support profile IDs.
2. Check if the "CONSTANT" causal is missing in the CAUSAL_FACTORS table. Run the next query (modify the profile id value if needed):
select * from causal_factors where engine_profiles_id=1
If no row has 'CONSTANT' value in the factor_name column, it should be added.
* Engine run crash after first branch have finished when using many engines in parralel
When not all engines were started yet, due to the 10 seconds delay between each and first branch already finished. Engine Manager will crash and stop the run. Workaround: decrease number of branch multiplier so branches will be larger or decrease number of engines in parralel if multiplier is already 1.
* ERROR alter table PDE_6 add constraint PDE_6_PK primary key (item_id,location_id,sales_date,promo_id) ERROR - Error Description?: ORA-02437: cannot validate (SARALEE_APR11.PDE_6_PK) - primary key violated
1. During the work on the ptp tuning project, I've come up against following error:
creating Promotions Data Engine? table
ERROR DB_Connection::Execute threw an exception:
ERROR alter table PDE_6 add constraint PDE_6_PK primary key (item_id,location_id,sales_date,promo_id)
ERROR - Error Description?: ORA-02437: cannot validate (YOURCOMPANY_APR11.PDE_6_PK) - primary key violated
ERROR - Error Number?: 0x80004005 - Unspecified error
ERROR - Native Error Number?: 2437
ERROR Execute SQL? failed: alter table PDE_6 add constraint PDE_6_PK primary key (item_id,location_id,sales_date,promo_id)
WARNING Failed to create indices on PDE table, possibly due to duplicate/NULL values, please verify related expressions in M3_CAUSAL_FACTORS and 'Init Params.Shift Dyn Promo Date?'.
The source of this issue was found in group by expression of create PDE Sql. That expression included promotion_type_id. Customer schema had same promotion on same combination at same date with different promotion types. So SQL inserted two rows to PDE_X table with same combination/promotion_id/date. After that it tried to add constraint of primary key item/location/promotion_id/sales_date and failed because of duplicate rows with same primary key.
In general it is a configuration error of customer that inserted different promotion types with same promotion_id. But engine should know to handle it or to produce some meaningful error.
As a workaround in one of the bugs DEV proposed the following : Configure Analytical Level Type? parameter in Init_Params_0 table, set value_string to be IS_SELF instead of PROMOTION_TYPE_ID.
2. During the work on patch. Price causal treatment was modified. Currently engine should use its default expression in case this causal is active.
Some customers schemas have a unique expression for price causal and engine has a problem to parse it in a right way that cause to engine errors from sql.
ERROR DB_Command::Execute threw an exception:
ERROR SELECT sales_date datett, round(NVL
nvl(demand_fact,0)),0)),sum(FORE_3)),6) sales, ......................
ERROR - Error Description?: ORA-00909: invalid number of arguments
Bug 12604957 was opened and resolved in 22.214.171.124. In case you cannot apply the fix, use workaround and set price expression to a default one.