Forum Discussion
Schema Name for Tables
- 6 months ago
Hi MarioTechera
You won't be able to see the schema because the tables loaded into or used in the model can be renamed. You can run INFO.PARTITIONS in DAX query view and filter the result to those that start with let which is what Power Query tables start with and those that contains the text Schema.
EVALUATE FILTER ( INFO.PARTITIONS (), LEFT ( [QueryDefinition], 3 ) = "let" && CONTAINSSTRING ( [QueryDefinition], "Schema" ) )This would return a table that you can copy-paste to Excel.
- 6 months ago
Hello MarioTechera ,
It can be difficult to fly blind in a large model, especially when you have overlapping table names across different schemas (like dbo.customer_orders and orders.customer_orders). By default, Power BI’s diagram view focuses on the model’s logical layer rather than the source’s physical metadata. Here are couple of steps you can take :
Example : I have imported 2 tables dbo.customer_orders and orders.customer_orders
1. Using Model View : suitable for less tables
you can check individual table properties once you have imported the tables using below steps :
Go to model view => Select a Table => go to properties => Check name or description
2. Using Power Query Steps : This is usually the fastest way to see every table's origin at once without writing code
Setps : go to transform data => Queries => Select a table => Go to Applied Steps => click the Navigation step ( usually 2nd step ) => check formula bar
3. You can also use external tools like tabular editor
Potential Fix : When importing from a multi-schema SQL database, rename your tables in the Power Query editor to include a prefix (e.g., dbo_customer_orders and orders_customer_orders). This keeps the schema visible in the Diagram View and the Fields list.
I hope this helps.
Did I answer your query ? Kindly mark this as solution if this helps , apprciate your kudos :).
Cheers
Neeraj Kumar
Turn on TMDL if you don't already have it (it's preview, but already stable in 2026): Go to File > Options & Settings > >Preview features → Flag TMDL view → Restart Power BI if necessary.
In the left sidebar, select the TMDL view icon (it looks like a code or script, it's usually the last icon). In the Data pane or Semantic model pane, select one or more tables:
- Drag the table (or Ctrl + click for several) into the code editor in TMDL view.
- Or right-click on the table > Script to TMDL (or similar, depending on the language).
- This automatically generates a TMDL script with the full table definition.
In the TMDL code that is generated, find the section of the table:
texttable MiTabla ... partition MiTabla mode import source type query query let Source = Sql.Database("servidor", "base_de_datos"), Schema = Source{[Schema="nombre_del_esquema"]}[Data], Tabla = Schema{[Name="nombre_tabla"]}[Data] in Tabla ...
- The value in Schema="nombre_del_esquema" is exactly the original SQL Server schema (e.g., "dbo", "sales", "hr", and so on).
If your query uses a native SQL query instead of schema/table navigation:
- You'll see something like query="SELECT * FROM[outline].[ table] ...", and there also appears the diagram.
To view all tables at once:
- Select the entire model (top in the Data pane) and drag it → Generate a large script with all the tables.
Use Ctrl + F in the TMDL editor to search for "Schema=" or "[schema]" and quickly find all schemas.
I hope this helps, in that case please mark it as a solution. Kudos are welcome.