Call Data Adapter in BR and Store Results in External Database Table
I would like to export data from existing OneStream dashboard and load it into external database table. I did some research and below is a draft business rule written in Visual Basic. What it does is to call data adapter and store the results. Next step is to load data from DataTable into external database table.
Questions is, it gives a warning "Function GetAdoDataSetForAdapter is obsolete", what is the current supported function?
Dim dctVars As New Dictionary(Of String, String)
Using ds As DataSet = brapi.Dashboards.Process.GetAdoDataSetForAdapter(si, False, "AdapterName", "ResultsTable", dctVars)
If ds.Tables.Count > 0 Then ' -- If there are >0 tables in the results
Using dt As DataTable = ds.Tables(0).Copy()
Return dt
End Using
End If
End Using
In the Business Rules editor if you type:
brapi.Dashboards.Process.GetAdoDataSetForAdapter(
it will give you the intellisense for the function which is like this:
1 - says 1 of 2 so there is another definition of this function with different parameters (ie overloaded)
2 - says the current definition is deprecated which is why you are getting the warning.
Click on the down arrow in area 1 and it gives you this:
which tells you the function needs the workspace id before the workspace/dashboard name.