Component mapping errors found during the initialization of all mappingsets
During the deployment of the dotstatsuiteNET@v7.0.0 to staging, there were some errors found in the logs, related to the initialization of all mappingsets. This causes that the data retrieval for those dataflows, does not work.
The issue seem to have affected the following dataflows:
- Space OECD-design: no issues
- Space OECD-staging: OECD.SDD:NASU2_1516_A(1.0), OECD.SDD:NASU2_17IN_5(1.0), OECD.SDD:NASU2_17PR_5(1.0)
Error:
"logger": "DotStat.Db.Repository.SqlServer.SqlTransactionRepository.InitializeAllMappingSets",
"message": "An unexpected error has occured while processing dataflow OECD.SDD:NASU2_1516_A(1.0): Component Mapping without constant value or columns is not valid for component 'FREQ' with parent '60189'.",
"exception": "System.InvalidOperationException: An unexpected error has occured while processing dataflow OECD.SDD:NASU2_1516_A(1.0): Component Mapping without constant value or columns is not valid for component 'FREQ' with parent '60189'.
---> Estat.Sri.Mapping.Api.Exceptions.ValidationException: Component Mapping without constant value or columns is not valid for component 'FREQ' with parent '60189'
at Estat.Sri.Mapping.MappingStore.Engine.ComponentMappingPersistenceEngine.Add(ComponentMappingEntity componentMappingEntity)
at Estat.Sri.Mapping.MappingStore.Engine.UserActionEngine`1.Add(TPermissionEntity entity)
at Estat.Sri.Mapping.Api.Manager.EntityPersistenceManager.Add[TEntity](TEntity entity)
at Estat.Sri.Mapping.Api.Manager.EntityPersistenceManager.AddEntities[TEntity](IEnumerable`1 entities)
at DotStat.MappingStore.MappingStoreDataAccess.SaveMappings(String storeId, String mappingSetId, String dataSetId, IEnumerable`1 components)
at DotStat.MappingStore.MappingStoreDataAccess.CreateOrUpdateMappingSet(String dataSpace, Dataflow dataFlow, Char targetVersion, Nullable`1 validFrom, Nullable`1 validTo, String query, String orderBy)
at DotStat.Db.Repository.SqlServer.SqlTransactionRepository.ManageDataflowMappingsets(Dataflow dataFlow, IMappingStoreDataAccess mappingStoreDataAccess, IDataStoreRepository dataStoreRepository)
at DotStat.Db.Repository.SqlServer.SqlTransactionRepository.InitializeAllMappingSets(Int32 transactionId, IMappingStoreDataAccess mappingStoreDataAccess, DotStatPrincipal principal)
--- End of inner exception stack trace ---"
The error only appears in the OECD-staging dataspace. In our analysis we found that the function init/allmappingsets was ran twice, and both calls overlapped for a short period of time. We asume that the issue was caused by that.
-
Analyse if there could be another cause of the issue -
If the issue is related to the overlap, provide a solution for the affected dataflows. -
Reflect on a solution on how to prevent this type of issues in future releases.
Logs files:
The data retrieval of the affected dataflow fails with the following message:
Incomplete mapping set. Please check if all dimensions, measure(s) and mandatory attributes are mapped:
Dimension 'FREQ' is not mapped.
Dimension 'REF_AREA' is not mapped.
Dimension 'COUNTERPART_AREA' is not mapped.
Dimension 'REF_SECTOR' is not mapped.
Dimension 'COUNTERPART_SECTOR' is not mapped.
Dimension 'ACCOUNTING_ENTRY' is not mapped.
Dimension 'STO' is not mapped.
Dimension 'ACTIVITY' is not mapped.
Dimension 'ACTIVITY_TO' is not mapped.
Dimension 'PRODUCT' is not mapped.
Dimension 'PRODUCT_TO' is not mapped.
Dimension 'UNIT_MEASURE' is not mapped.
Dimension 'VALUATION' is not mapped.
Dimension 'PRICES' is not mapped.
Dimension 'CUST_BREAKDOWN' is not mapped.
Dimension 'TABLE_IDENTIFIER' is not mapped.
Time Dimension 'TIME_PERIOD' is not mapped.
Primary Measure 'OBS_VALUE' is not mapped.
Mandatory attribute 'CONF_STATUS' is not mapped.
Mandatory attribute 'DECIMALS' is not mapped.
Mandatory attribute 'OBS_STATUS' is not mapped.
Mandatory attribute 'TIME_FORMAT' is not mapped.
Mandatory attribute 'UNIT_MULT' is not mapped.
End of mapping completeness check. IsMappingSetComplete result is : Incomplete