Forum Discussion
How to update dataflow M scripts from JSON file?
Hi
Currently, Power BI does not provide a direct method to update an existing dataflow in a workspace using a JSON file without creating a new dataflow. When you export a dataflow as a JSON file and then import it into another workspace, it creates a new dataflow with a new ID, even if the name is the same. This means that datasets or reports connected to the original dataflow will not automatically switch to the new one, leading to broken links unless they are manually repointed. Unfortunately, Power BI does not support updating or overwriting an existing dataflow via JSON import in a way that retains the original dataflow ID. To work around this, you would need to manually update the M code within the existing dataflow in the production workspace using the Power BI Service interface or through the Power BI REST API (if supported), thereby preserving the original dataflow ID and avoiding the need to rebind dependent datasets.