I am facing one problem we have data in OLAP SSAS cube we need to use the data in the application but problem is data cleaning needs to be done based on requirement before sending the data to front end like calculated measures are coming in columns and should be rows and id should be mapped ,data casting and column name modification etc., currently we are using linked server from sql and using tsql we are providing data to .net
1 Answers
0
votes
You need to use ADOMDConnection and load the MDX query result into a datatable.
Do the cleansing on top of datatable
Send the cleaned result to frontend
using (AdomdConnection con = new AdomdConnection(connection_string))
{
con.Open();
using (AdomdCommand command = new AdomdCommand(query, con))
{
using (AdomdDataReader reader = command.ExecuteReader())
{
var dataTable = new DataTable();
dataTable.Load(dataReader);
//business logic:
//After loading the datatable, do the cleansing here and finally send to frontend
}
}
}