#4 Microsoft Fabric: Prepare and load data into your LakeHouse

To prepare and load data into your lakehouse, take the following steps:

1. From your Power BI Workspace, select your Lakehouse to navigate to the Lakehouse editor

No alt text provided for this image

2. Once you’re in the Lakehouse editor, select New Dataflow Gen2.

No alt text provided for this image

83. Once you’re in the Power Query Online editor for Dataflows Gen2, select Import from a Power Query template and choose the template file downloaded from the link https://github.com/microsoft/pbiworkshops/raw/main/_Asset%20Library/Source_Files/ContosoSales.pqt.

No alt text provided for this image

4. Select the DimDate query under the Data load query group and then select on Configure connection. If necessary, set the authentication type to Anonymous before selecting Connect.

No alt text provided for this image

5. With the DimDate query selected, in the data preview window, change the data type of the DateKey column to Date/Time by selecting the icon in the top left (Note: The lakehouse only supports datetime data types. If you attempt to load date only data, an error message is presented).

No alt text provided for this image

6. Select Replace current within the Change column type window.

No alt text provided for this image

Add a data destination

Now, you need to add a data destination for your queries. Take the following steps to add a data destination:

7. With the DimDate table selected, from the Home tab, select Add data destination and then select the Lakehouse option menu item.

No alt text provided for this image

8. If necessary, set the authentication to Organizational account and then select Next.

No alt text provided for this image

9. From the navigator, select the workspace used for this tutorial and expand to view all Lakehouse items. Select SalesLakehouse and confirm that the default New table is selected before selecting Next to continue.

No alt text provided for this image

10. Set the Update method to Replace and then select Save settings.

Note that setting the update method to Replace deletes all existing data and replaces it with the new data on each subsequent refresh.

No alt text provided for this image

11. In the bottom right corner of the Power Query Online editor, you can find the configured Data destination settings for your query where you can further customize or remove.

No alt text provided for this image

Make sure to perform the same steps above to configure the Lakehouse as your data destination for each of the following queries.

Query

DimCustomer

DimEmployee

DimProduct

DimStore

12. Select the FactOnlineSales query under the Data transformation query group and from the Home tab, select Add data destination and then select the Lakehouse option.

No alt text provided for this image

13. If necessary, set the authentication to Organizational account and then select Next.

No alt text provided for this image

14. From the navigator, select the workspace used for this tutorial and expand to view all Lakehouse items. Select SalesLakehouse and confirm that the default New table is selected before selecting Next to continue.

No alt text provided for this image

15. Set the Update method to Append and then select Save settings.

No alt text provided for this image

Note: This process inserts data, preserving the existing rows within the table on each subsequent refresh.

16. Select Publish to save your dataflow and exit the Power Query Online editor.

No alt text provided for this image

To prepare and load data into your lakehouse, take the following steps:

1. From your Power BI Workspace, select your Lakehouse to navigate to the Lakehouse editor

No alt text provided for this image

2. Once you’re in the Lakehouse editor, select New Dataflow Gen2.

No alt text provided for this image

83. Once you’re in the Power Query Online editor for Dataflows Gen2, select Import from a Power Query template and choose the template file downloaded from the link https://github.com/microsoft/pbiworkshops/raw/main/_Asset%20Library/Source_Files/ContosoSales.pqt.

No alt text provided for this image

4. Select the DimDate query under the Data load query group and then select on Configure connection. If necessary, set the authentication type to Anonymous before selecting Connect.

No alt text provided for this image

5. With the DimDate query selected, in the data preview window, change the data type of the DateKey column to Date/Time by selecting the icon in the top left (Note: The lakehouse only supports datetime data types. If you attempt to load date only data, an error message is presented).

No alt text provided for this image

6. Select Replace current within the Change column type window.

No alt text provided for this image

Add a data destination

Now, you need to add a data destination for your queries. Take the following steps to add a data destination:

7. With the DimDate table selected, from the Home tab, select Add data destination and then select the Lakehouse option menu item.

No alt text provided for this image

8. If necessary, set the authentication to Organizational account and then select Next.

No alt text provided for this image

9. From the navigator, select the workspace used for this tutorial and expand to view all Lakehouse items. Select SalesLakehouse and confirm that the default New table is selected before selecting Next to continue.

No alt text provided for this image

10. Set the Update method to Replace and then select Save settings.

Note that setting the update method to Replace deletes all existing data and replaces it with the new data on each subsequent refresh.

No alt text provided for this image

11. In the bottom right corner of the Power Query Online editor, you can find the configured Data destination settings for your query where you can further customize or remove.

No alt text provided for this image

Make sure to perform the same steps above to configure the Lakehouse as your data destination for each of the following queries.

Query

DimCustomer

DimEmployee

DimProduct

DimStore

12. Select the FactOnlineSales query under the Data transformation query group and from the Home tab, select Add data destination and then select the Lakehouse option.

No alt text provided for this image

13. If necessary, set the authentication to Organizational account and then select Next.

No alt text provided for this image

14. From the navigator, select the workspace used for this tutorial and expand to view all Lakehouse items. Select SalesLakehouse and confirm that the default New table is selected before selecting Next to continue.

No alt text provided for this image

15. Set the Update method to Append and then select Save settings.

No alt text provided for this image

Note: This process inserts data, preserving the existing rows within the table on each subsequent refresh.

16. Select Publish to save your dataflow and exit the Power Query Online editor.

No alt text provided for this image

17. Hover above the created dataflow in your workspace, select the ellipses (…) and the Properties option.

No alt text provided for this image

18. Change the name of the dataflow to OnlineSalesDataflow and select Save.

No alt text provided for this image

17. Hover above the created dataflow in your workspace, select the ellipses (…) and the Properties option.

No alt text provided for this image

18. Change the name of the dataflow to OnlineSalesDataflow and select Save.

No alt text provided for this image
Call Now