FDX Cube View Connector Rule Error - Non-Numeric Value
Hi All,
I am trying to extract data from cube view using FdxExecuteCubeView function and load the result back to cube through a connector. However, when I execute the workflow dataload, a "No valid DataKeys (Scenario / Time)" error occurred. I checked the log, it pointed out to be "Non-Numeric Amount ..................... 4" error
On the log, I am able to see the data I extracted as this :
Dim nvb As New NameValueFormatBuilder(api.WorkflowProfile.GetAttributeValue(api.ScenarioTypeID, SharedConstants.WorkflowProfileAttributeIndexes.Text4))
Dim cubeViewName As String = nvb.NameValuePairs.XFGetValue("CubeViewName", String.Empty)
Dim entityDimName As String = nvb.NameValuePairs.XFGetValue("EntityDimName", String.Empty)
Dim entityMemFilter As String = nvb.NameValuePairs.XFGetValue("EntityMF", String.Empty)
Dim scenarioDimName As String = nvb.NameValuePairs.XFGetValue("ScenarioDimName", String.Empty)
Dim scenarioMemFilter As String = nvb.NameValuePairs.XFGetValue("ScenarioMF", String.Empty)
Dim timeMemFilter As String = nvb.NameValuePairs.XFGetValue("TimeMF", String.Empty)
Dim params As String = nvb.NameValuePairs.XFGetValue("Params", String.Empty)
Dim nvbParams As New NameValueFormatBuilder(params)
Dim includeCellTextCols As Boolean = False
Dim useStandardFactTableFields As Boolean = True
Dim useGenericTimeColNames As Boolean = True
Dim filter As String = nvb.NameValuePairs.XFGetValue("Filter", String.Empty)
Dim parallelQueryCount As Integer = 8
Dim logStatistics As Boolean = False
'Process Data
Dim dt As DataTable = BRApi.Import.Data.FdxExecuteCubeView(si, cubeViewName, entityDimName, entityMemFilter, scenarioDimName, scenarioMemFilter, timeMemFilter, nvbParams, includeCellTextCols, useStandardFactTableFields, filter, parallelQueryCount, logStatistics)
I don't think the rule or the call of the FDX is the issue as I am able to see data in my log. However, I am not sure how to resolve the non-numeric amount issue. Is it because the data saved on data table are all considered as Strings, even for amount?
When FdxExecuteCubeView is run, the return data table has a special column name "V2023" rather than "Amount", which makes connector confused where the amount column is. After manually assign the column name back to Amount, issue resolved.
dt.Columns(19).ColumnName = "Amount"
Note: index 19 is amount column. This is to change the column name to "Amount"
When FdxExecuteCubeView is run, the return data table has a special column name "V2023" rather than "Amount", which makes connector confused where the amount column is. After manually assign the column name back to Amount, issue resolved.
dt.Columns(19).ColumnName = "Amount"
Note: index 19 is amount column. This is to change the column name to "Amount"