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
2. Once you’re in the Lakehouse editor, select New Dataflow Gen2.
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.
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.
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).
6. Select Replace current within the Change column type window.
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.
8. If necessary, set the authentication to Organizational account and then select Next.
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.
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.
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.
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.
13. If necessary, set the authentication to Organizational account and then select Next.
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.
15. Set the Update method to Append and then select Save settings.
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.
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
2. Once you’re in the Lakehouse editor, select New Dataflow Gen2.
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.
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.
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).
6. Select Replace current within the Change column type window.
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.
8. If necessary, set the authentication to Organizational account and then select Next.
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.
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.
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.
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.
13. If necessary, set the authentication to Organizational account and then select Next.
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.
15. Set the Update method to Append and then select Save settings.
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.
17. Hover above the created dataflow in your workspace, select the ellipses (…) and the Properties option.
18. Change the name of the dataflow to OnlineSalesDataflow and select Save.
17. Hover above the created dataflow in your workspace, select the ellipses (…) and the Properties option.
18. Change the name of the dataflow to OnlineSalesDataflow and select Save.