Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello,
what I know is that I can not update oneLake semantic model once created. (it is only available through LakeHouse SQL EndPoint whiich I do not care).
So how to do this in programmatic way when I add new tables into OneLake based semantic model?
reference:
https://learn.microsoft.com/en-us/fabric/fundamentals/direct-lake-edit-tables
Best,
Jacek
Thank you @DataNinja777 ,
can i use rest apis to add new tables also?
Which one to use then?
Best,
Jacek
Hi @jaryszek ,
Thanks for reaching out to the Microsoft fabric community forum.
You can’t use the Fabric REST APIs today to add new tables directly into a semantic model. The REST APIs mainly let you manage workspaces, datasets, refreshes, and other operational aspects, but they don’t expose endpoints for modifying the model’s metadata (like adding tables or measures).
For schema changes, the supported way is through the XMLA endpoint with either:
Additionally, this REST endpoint lets you push an updated definition of the semantic model (its schema and structure)
Items - Update Semantic Model Definition - REST API (SemanticModel) | Microsoft Learn
I hope this information helps. Please do let us know if you have any further queries.
Thank you
Hello,
thanks.
by this: Items - Update Semantic Model Definition - REST API (SemanticModel) | Microsoft Learn
If i will add table into semantic model i should be able to make this working?
Best,
Jacek
Hi @jaryszek ,
You're correct that after a Direct Lake semantic model is created in Microsoft Fabric, you can't add new tables from the underlying Lakehouse through the web interface. The solution to this is to update the model programmatically. You can achieve this by connecting to the XMLA endpoint of your Fabric workspace, which allows you to use external tools and scripts to directly modify the model's metadata.
There are a few ways to perform these programmatic updates. One common method is using Tabular Model Scripting Language (TMSL), a JSON-based language, with tools like SQL Server Management Studio (SSMS). The general process is to connect to the XMLA endpoint, script out the existing model's definition, add the JSON code for your new table, and then execute the modified script to replace the old model structure. For more complex automation, you can use the Tabular Object Model (TOM), a .NET library that lets you write C# or PowerShell scripts to connect to the model, create new table objects, define their properties to point to the new data in OneLake, and then save the changes back to the service. Many developers also use third-party tools like Tabular Editor, which connects to the XMLA endpoint and offers a user-friendly interface for making these metadata changes directly.
To get started, you must first ensure the XMLA endpoint for your Fabric capacity is enabled for "Read Write" in the Admin portal. Then, you'll need to copy the workspace connection string from the "Premium" settings tab in your workspace; this string is the server address your tools will use to connect. With these prerequisites in place, you can use your chosen method to programmatically add new tables and keep your semantic model in sync with your Lakehouse. This programmatic approach is the intended and powerful way to manage Direct Lake models beyond their initial creation.
Best regards,
User | Count |
---|---|
11 | |
4 | |
4 | |
3 | |
3 |