Symptom
- Create a dataset using the POST /api/datasets/models REST API.
- Publish the dataset.
- Create a dataset using POST /api/datasets/models with the same name used in step 1. This overwrites the dataset created in step 1.
- Publish the dataset with the "ADD", "UPDATE", or "UPSERT" policy. When you get the publish status using GET /api.datasets//{datasetId}/uploadSessions/{uploadSessionId}/publishStatus) the following error occurs:
QueryEngine encountered error: DynamicUpdate4IMDB() error when running EMMA dynamic republish
The error occurs in 11.2.3 only. The key items that trigger the issue are:
- Using the POST/ api/dataset/models endpoint to create the dataset
- Dataset overwrites the existing dataset when it is published
- Using the "ADD", "UPDATE" or "UPSERT" policies to republish the newly created dataset
Workarounds
There are two workarounds for this issue.
Solution 1
Delete the existing cube cache after step 3. Since you created a new cube in step 3, the existing cube cache will be invalid. Manually deleting the cache will not produce the issues described earlier.
Solution 2
Modify the script to use the "REPLACE" policy in step 4. When using "REPLACE", the old data is automatically cleared and the new data is used. However, if you continue to use this script to republish the dataset, remember to change the "REPLACE" policy to the one you really want to use. Otherwise, you data could be lost.