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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a requirement where i have complex nested XML and i want to explode the same into multiple tables by establishing primary and foreign key relation. How can i achieve the same in fabric. Can we use dataflow gen2 or notebooks would be correct option to do it. Please note nesting can go upto 30+ levels.
Solved! Go to Solution.
Hi @Ymatole,
We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support
Hi @Ymatole,
We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.
@Ugk161610, Thanks for your prompt response
Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support
@Ymatole ,
For very deeply nested XML (20–30+ levels) use notebooks (PySpark) in Fabric — not Dataflow Gen2. Dataflow Gen2 is OK for light/medium hierarchies, but for extreme nesting it becomes hard to maintain and fragile. Notebooks give full control, better performance and easier error handling.
Why notebooks / Spark:
You can use the spark-xml parser to read XML into DataFrames and then programmatically flatten/explode nodes
Small PySpark example (conceptual):
GopiKrishna
Thank you. It works.