How to find lineage between SSAS (Tabular Model) and SQL database

好久不见. 提交于 2021-01-29 18:43:14

问题


We have 20+ tabular cubes with 300+ dimensions and was hoping to find - if there is some automated way to find what is the source for this dimension

Yes manually, I can get into Tabular model > Table Properties and can find what view and table are used to populate dimension. However not practically possible to get for 300+ dimensions.

And yes, I know some 3rd party provider such as SQL Sentry has some tools which can find that lineage.

But just wondering, is there any SSAS DMVs or any other script which can give these details?

Much appreciated for all your help

Note: Environment is On-Prem Microsoft SQL 2016 suite (SQL DB, SSAS and SSIS)


回答1:


For compatibility level 1200 or above Tabublar models the QueryDefinition column of the $SYSTEM.TMSCHEMA_PARTITIONS DMV will show the source SQL statement for either each partition, or the entire dimension/fact table if it isn't partitioned. In the event that a full table or view name is used (instead of a query) the full SELECT statement will be displayed with the object name. This can be queried from either SSMS by connecting to the SSAS server and opening a new MDX/DAX query window or another tool such as Dax Studio. This DMV is specific to whatever model you're connected to, as opposed to the whole SSAS instance. In the example below the Name column is the name of the dimension from the model. Since Name is a keyword it will need to be enclosed in brackets.

SELECT QueryDefinition FROM $SYSTEM.TMSCHEMA_PARTITIONS WHERE [Name] = 'DimensionName'


来源:https://stackoverflow.com/questions/55056248/how-to-find-lineage-between-ssas-tabular-model-and-sql-database

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!