Forum Discussion
Anonymous
1 year agoNot applicable
Migration: Dataflows Gen1 to Gen2
Hi Community,
Greetings for the day.
I have a scenario where I need to migrate dataflows gen1 to gen 2. I can easily export the power query template from gen1 and import it to gen2. But this is a manual step, is there an API that can export power query templates from Gen1 and that which can import a power query template to gen2?
I was only able to get this: https://learn.microsoft.com/en-us/fabric/data-factory/dataflow-gen2-migrate-from-dataflow-gen1-scenarios
Appreciate any help that can automate this process.
Thanks and regards,
Hrishi
Gen1: Use Power BI REST API
- Use: GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}
- Extract Power Query M script (from JSON response).
Gen2: No API for direct import yet
- Manual import via UI: Use Power Query editor in Dataflows Gen2 to paste M script.
- No public API currently to programmatically create Gen2 dataflows with M script.
Workaround
- Automate Gen1 M extraction using REST API + PowerShell/Python.
- Create Gen2 dataflows manually or wait for future Fabric API updates.
1 Reply
- BhavinVyas3003Super User
Gen1: Use Power BI REST API
- Use: GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}
- Extract Power Query M script (from JSON response).
Gen2: No API for direct import yet
- Manual import via UI: Use Power Query editor in Dataflows Gen2 to paste M script.
- No public API currently to programmatically create Gen2 dataflows with M script.
Workaround
- Automate Gen1 M extraction using REST API + PowerShell/Python.
- Create Gen2 dataflows manually or wait for future Fabric API updates.