Can you easily convert a DSDataResponse object to a datatable in C# ?
The DSDataRequest is passing multiple Instrument and DataTypes objects returning to a DSDataResponse.
Thanks,
Fergal
Hi @fergal.twomey
There is no simple means of converting from DSDataResponse to a C#DataTable. You would have to walk through the response collection and build theDataTable on the fly.
The ProcessSnapshot method in the GetData example code producestabulated output on the console. Converting that to a DataTable should besimple enough; simply replace the code constructing a line of tabulated outputwith code constructing a DataRow object.
For Timeseries requests, especially with multiple instruments in eachrequest, the construction would be more complex. You would want multipleDataTables, one for each instrument, and each row being the data for a specificdate. The ProcessTimeSeries method in the GetData example code also producestabulated data, albeit with the dates represented as columns. You would have topivot that data to get the dates as rows.