You are connecting via Server connection (AMO) which is the connection used to manage or read the cube structure like you do it from BIDS.
If you want to get data content and not cube structure, you have to use a client connection (Microsoft.AnalysisServices.AdomdClient.AdomdConnection
). If you have an open client connection, say clientCon
, you can access the schemas like MDSCHEMA_MEMBERS
as follows:
AdomdRestrictionCollection restrColl = new AdomdClient.AdomdRestrictionCollection();
restrColl.Add("CATALOG_NAME", "My Warehouse");
restrColl.Add("CUBE_NAME", "My Cube");
restrColl.Add("HIERARCHY_UNIQUE_NAME", "[MyDim].[MyHierarchyName]");
DataSet ds = clientCon.GetSchemaDataSet("MDSCHEMA_MEMBERS", restrColl);
foreach(var row in ds.Tables[0].Rows) {
// do something with the data
}