Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
When I open a composite model using TOM in Powershell, the model object is empty. I use the following code which works fine :
Hi @v-veshwara-msft ,
Thanks for your answer. I think I have to conclude that TOM can't be used when dealing with a composite model. I always wonder myself how a tool like Tabular Editor does this then. It's a bit of a shame, because TOM is so helpful to quickly do some changes using Powershell.
Hi @Peter_MTG ,
Thanks for the follow-up.
In scenarios involving composite models, especially those with DirectQuery connections to Power BI datasets or Analysis Services models, there might be cases where TOM doesn't return all model metadata in PowerShell. While it can work with live connections and show tables and relationships in many cases, certain external or linked sources might still lead to limitations or unexpected behavior.
Tabular Editor can connect to the same XMLA endpoint but also integrates with the running Power BI Desktop session, which may allow it to access additional metadata, including from cached or session-specific content.
Agreed that TOM is very efficient for making multiple updates at once, and it would be helpful if it supported a wider range of model types.
You could consider submitting this as an idea in the Ideas Forum for broader visibility and also to find inputs from others who might have worked around similar limitations.
Hi @Peter_MTG ,
Thanks for posting in Microsoft Fabric Community and sharing the script and explanation.
This might be related to how TOM interacts with composite models that include remote sources using DirectQuery, such as Power BI datasets, Analysis Services models.
In such cases, the $db.object may appear empty, as TOM typically surfaces only the metadata that's locally defined in the model. Tables and relationships from remote sources might not be accessible through this method.
You had shared a similar scenario earlier where changing from the Power BI Dataflows (Legacy) connector resolved the issue, which could suggest that certain connectors or model configurations affect how TOM sees the model.
Please go through these links for more details:
Programming Power BI semantic models with the Tabular Object Model (TOM) | Microsoft Learn
Hope this helps. Please reach out for further assistance.
Thank you.
Hi @Peter_MTG ,
Just wanted to check if the response provided was helpful. If further assistance is needed, please reach out.
Thank you.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
71 | |
70 | |
38 | |
27 | |
26 |
User | Count |
---|---|
97 | |
96 | |
59 | |
44 | |
40 |