I'm interested in creating an exception report that will show me the differences between a cube (Analysis Services) and the original data source (SQL table). For instance, let's assume that I build a cube from one table. If this table contains 100 records, then my cube should contain 100 records. If I query my data source vs. the fact table, I could potentially get the wrong results, because it's possible that not every fact table record would have a valid key (assuming that the cleansing routine doesn't handle all the varieties of data fed into the ETL). In this case, my data source and the fact table are in synch. However, my data source and the cube would be out of synch, if there were problems in the ETL.

Does anyone know how to query a cube through SQL? Or some other mechanism, like VB?