Edit

Share via


Move queries from Dataflow Gen1 to Dataflow Gen2

Dataflow Gen2 is the new generation of dataflows. However, many existing dataflows were created over the years using the original version of dataflows (now called Dataflow Gen1 and listed as the Dataflow type in your workspace). This article describes three methods for migrating your older Dataflow Gen1 dataflows into Dataflow Gen2 (CI/CD): importing Dataflow Gen1 dataflows into Dataflow Gen2 using the export template feature, copy the Gen1 queries and paste them into a new Dataflow Gen2, or using the Save As feature for saving an existing Dataflow Gen1 as a new Dataflow Gen2 (CI/CD).

Use the export template feature

Use the export template feature if you're aiming to copy all queries in a dataflow, or all queries from another PowerQuery host such as Power Platform Dataflow or Excel Workbook.

To use the export template feature:

  1. From your Power BI or Data Factory workspace, select the ellipsis next to an existing Dataflow Gen1 and then select Edit.

    Screenshot showing the workspace, with the dataflow menu open and edit emphasized.

  2. In the Home tab of the Power Query editor, select Export template.

    Screenshot showing the Power Query editor, with the Export template option emphasized.

  3. In Export template, enter the name you want to call this template in Name. Optionally, you can add a description for this template in Description.

    Screenshot showing the Export template dialog box, with Contoso Sample 48 entered in Name.

  4. Select OK to save the template. The template is saved in your default Downloads folder.

  5. From your Data Factory workspace, select New item, and then select Dataflow Gen2.

    Screenshot with the New menu opened with Dataflow Gen2 emphasized.

  6. From the current view pane of the Power Query editor, select Import from a Power Query template.

    Screenshot showing the current view with Import from a Power Query template emphasized.

  7. In the Open dialog box, browse to your default Downloads folder and select the .pqt file you saved in the previous steps. The select Open.

  8. The template is then imported to your Dataflow Gen2. You might be required to enter your credentials at this time. If so, select Configure connection and enter your credentials. Then select Connect.

    Screenshot showing the Power Query editor with Configure connection emphasized.

Your Dataflow Gen1 is now imported to Dataflow Gen2.

Copy and paste existing Dataflow Gen1 queries

Use the copy existing Dataflow Gen1 queries if you're aiming to copy only a subset of your queries.

To copy existing Dataflow Gen1 queries:

  1. From your Power BI or Data Factory workspace, select the ellipsis next to an existing Dataflow Gen1 and then select Edit.

    Screenshot showing the workspace where you choose to edit the dataflow.

  2. In Power Query, select the query or queries you want to copy. If there are multiple queries or folders (called groups in Power Query) you want to copy, select Ctrl as you select the queries or folders you want to copy. Then either select Ctrl+C or right-click in the selection and select Copy.

    Screenshot showing the Power Query workspace with the Contoso Financial Sample query selected and the copy option emphasized.

  3. Open an existing Dataflow Gen2, or create a new Dataflow Gen2 in Data Factory. To create a new dataflow, open an existing workflow and select New item > Dataflow Gen2.

    Screenshot showing the New menu opened with Dataflow Gen2 emphasized.

  4. In the Power Query editor, select Get data > Blank query.

    Screenshot showing the Get data menu opened with Blank query emphasized.

  5. In the Blank query dialog box, select Next.

  6. Select inside the Queries pane of the Power Query editor, and then select Ctrl+V to paste the query.

  7. You might need to add your credentials before you can use the pasted queries. If a Credentials are required to connect to the Web source. message appears, select Configure connection, and then enter your credentials.

    Screenshot showing the credentials error message and configure credentials button.

  8. Select Connect to connect to your data.

  9. Once you connect to your data, right-click the initial blank query, and then select Delete to remove the empty query.

    Screenshot showing the blank query selected, with emphasis on the delete option in the query's menu.

Save an existing Dataflow Gen1 As a new Dataflow Gen2 (CI/CD)

Use the Save As (preview) feature if you’re aiming to upgrade an entire Dataflow Gen1 to Dataflow Gen2 (CI/CD), including its settings (for more information, go to Known limitations) and queries.

To use the Save As (preview) feature:

  1. In your workspace, select the ellipsis (...) next to an existing dataflow, and select Save as Dataflow Gen2 in the context menu.

    Screenshot of the context menu under the ellipsis, showing the Save as Dataflow Gen2 (CI/CD) option.

  2. In the Save as dialog, optionally change the default Name, and then select Create.

    Screenshot of the save as option where you can enter the name of the dataflow.

    The new Dataflow Gen2 (CI/CD) is opened, enabling you to review and make any changes.

    You're required to reconnect to data sources, which can be done by selecting the Configure connection button within the Credentials are required error message.

    Screenshot showing where to enter your credentials for the new dataflow.

  3. Close the new Dataflow Gen2 (CI/CD), or select Save or Save and run.