Symptom
- When importing data into a private dimension using a Multi Action HTTP API without including master data, the data is being rejected and the following error is thrown:
-
- "_REJECTION_REASON": "Invalid column value for: <column name>"
Environment
SAP Analytics Cloud
Reproducing the Issue
For testing purposes with your own model, you can test the following steps:
- Remove an specific value A from model Private dimension X.
- Execute an Import Job using the SAC data import API to send members with value A into private dimension X without including master data
- Observe the failure on API Job with error: "Invalid column value for: X"
- Check that no A member is available at private dimension X.
Cause
This behavior is expected.
An import job will fail if there is no corresponding master data for a specific key. The reason is that the API import job is using EntitySetName of 'FactData', which requires all master data to be present. What happens is that the Data Import API performs validation on the data in the body, and then rejects it due to no corresponding Master Data being present.
See Resolution section for how to successfully import.
Resolution
To be able to import data that does not contain corresponding Master Data, this can be done by using the entitySetName of 'MasterFactData'. This EntitySetName allows users to import data to both the Dimension tables, and the Fact Table, in the same import.
Please note that there is a slight difference in how SAC expect to receive data between FactData and MasterFactData. Namely in a MasterFactData job, it expects all columns to have prefixes to indicate which column in the dimension table the data is located. For instance, instead of 'MyDimensionName', we would have 'MyDimensionName__ID', for the ID, and 'MyDimensionName__Description' for the description.
Information on what columns are expected can be found in the '/models/modelID/metadata' endpoint, under the 'MasterFactData' object. In this case, only the key columns will be required, which will almost always be the ID column. Other columns can be ignored, such as description etc, but they will then have no details in the other columns in the Dimension table.
There is a couple of approaches that could be taken to doing this:
- Creating an Import Job with mappings to map 'MyDimensionName___ID' in the model to 'MyDimensionName' in the file:
- Creating an import job with these mappings (for every dimension), would allow the users to import the data they have specified above, without making any changes, but it would result in the additional columns in the Dimension table being left empty.
- Modify the Data being imported to include the data for other columns in the dimension table:
- With this approach, instead of having "MyDimensionName":"PH_01" in the body, you would have 'MyDimensionName__ID":"PH_01", "MyDimensionName__Description":"Description For MyDimensionName" in the file.
- The exact columns expected can be found in the metadata.
- Again, it is only the key columns that are required. If there is no ID column specified (or mapped as mentioned in step 1), then the import will be rejected. But if we do not include some non-key columns, the import will succeed, just leaving the cells in the column for that Master Data blank.
See Also
- 2569847 - Where can you find SAC user assistance (help) to use, configure, and operate it more effectively?
- Have a question? Ask it here and let our amazing SAP community help! Or reply and share your knowledge!
- 2487011 - What information do I need to provide when opening an incident for SAP Analytics Cloud?
- Search for SAP Analytics Cloud content using Google or Bing:
- https://www.google.ca/search?q=site%3Ahttps%3A%2F%2Fapps.support.sap.com+SAP+Analytics+Cloud
- https://www.bing.com/search?q=site%3Ahttps%3A%2F%2Fapps.support.sap.com+SAP+Analytics+Cloud
- Note: Add relevant text or warning/error messages to the text search field to filter results.
- SAP Analytics Cloud > Learning > Data Connections
- SAP Analytics Cloud > Learning > Guided Playlists
- SAP Analytics Cloud > Learning > Guided Playlists > Getting Support
- Need More Help? Contact Support or visit the solution finder today!
Your feedback is important to help us improve our knowledge base.
Keywords
SAC, Import, API, Private Dimension, Master Data, MasterFactData, FactData, EntitySetName , KBA , LOD-ANA-AQU , Import Data Connections (Acquiring Data) , Problem