I'm doing some queries in a SSAS model using SSMS and MDXQuery . I'm able to run a single select on any table as below:
SELECT[TableID], [Name] FROM $SYSTEM.TMSCHEMA_PARTITIONS
SELECT [ID], [Name] FROM $SYSTEM.TMSCHEMA_TABLES
The first select gives me the partitionNames assign to each table and the table ID, now I want to know what is the table name behind that TableID but I've tried a JOIN between both tables but I'm getting an error
SELECT[TableID], [Name] FROM $SYSTEM.TMSCHEMA_PARTITIONS a
JOIN $SYSTEM.TMSCHEMA_TABLES b on a.TableId = b.ID
I am more a SQL developer so I though the JOIN might work but is not , how can I join these 2 tables to get all needed columns?



You can't do joins via SQL with Dynamic Management View tables. The SQL used for DMVs is a subset of T-SQL. The normal approach is to load the data into tables and then do the joins. I do this all the time in Power Query from Excel and Power BI Desktop.
Here are my sources:
https://isura777.blogspot.com/2016/03/dynamic-management-views-for-ssas.html
https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2012/hh230820(v=sql.110)