Редактиране

Споделяне чрез


Move queries from Dataflow Gen1 to Dataflow Gen2

Dataflow Gen2 is the new generation of dataflows. However, many existing dataflows have been 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 how you can reuse your older Dataflow Gen1 dataflows by importing Dataflow Gen1 dataflows into Dataflow Gen2 using the export template feature. It also includes information on how to copy the Gen1 queries and paste them into a new Dataflow Gen2.

Use the export template feature

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, 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 has now been imported to Dataflow Gen2.

Copy and paste existing Dataflow Gen1 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 > 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've connected 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.