FdxExecuteCubeView unstable when using NameValueBuilder
Hi all, we are using FDX routines to extract high volume data from our cubes for external consumptions and we noticed an odd behaviour when using the FdxExecuteCubeView method with parallel processing and a NameValueBuilder parameter: we wanted to share this with the community to understand if it is an undocumented bug or else.
FdxExecuteCubeView advantages:
- extracting any type of cube data (base/aggregated, input/calculation/dynamic)
- leveraging parallel processing for the given combinations of entity/scenario/time (e.g. using the FDXEntity/Scenario/Time substitution variables in the CV)
Among the FdxExecuteCubeView input parameters, it is possible to define a NameValueBuilder object to evaluate at run-time other eventual substitution variables in the cube view.
⚠️Unexpected behaviour
It seems that, when using both parallel processing (e.g. the FDXEntity/Scenario/Time filters trigger multiple CV rendering, with parallelQueryCount option > 1) and a NameValueBuilder object (even empty), the records appended to the output DataTable are repeated (e.g. duplicated) and/or missing.
This can be solved using nothing instead of a NameValueBuilder object.
E.g. using GolfStream, let's extract data for Houston entities using FdxExecuteCubeView method:
- in the top pivot, the data adapter leverages FdxExecuteCubeView with a NameValueBuilder input param (see code at the bottom)
- in the middle pivot, FdxExecuteCubeView without the NameValueBuilder param (e.g. using nothing)
- at the bottom, a validation cube view
[...]
'# Name-Value dictionary
Dim nvbParams As New NameValueFormatBuilder("Tizio=Caio")
[...]
'# FdxExecuteCubeView with NameValueBuilder
Dim dt As DataTable = BRApi.Import.Data.FdxExecuteCubeView(si, _
workspaceID, cubeViewName, _
entityDimName, entityMemFilter, _
scenarioDimName, scenarioMemFilter, _
timeMemFilter, _
nvbParams, _
includeCellTextCols, useStandardFactTableFields, _
filter, _
parallelQueryCount, logStatistics)
[...]
'# FdxExecuteCubeView without NameValueBuilder
Dim dt As DataTable = BRApi.Import.Data.FdxExecuteCubeView(si, _
workspaceID, cubeViewName, _
entityDimName, entityMemFilter, _
scenarioDimName, scenarioMemFilter, _
timeMemFilter, _
nothing, _
includeCellTextCols, useStandardFactTableFields, _
filter, _
parallelQueryCount, logStatistics)
We noticed it long time ago but didn't find any literature on this, we can share the dummy workspace/dashboard if anyone else wants to check this (and there is an easy way to share it, without writing all the code...).