|
| 1 | +--- |
| 2 | +title: "Connect Azure Data Lake Storage Gen2 for dataflow storage | MicrosoftDocs" |
| 3 | +description: "Learn how connect Azure Data Lake Storage Gen2 for dataflow storage" |
| 4 | +ms.custom: "" |
| 5 | +ms.date: 09/05/2019 |
| 6 | +ms.reviewer: "" |
| 7 | +ms.service: powerapps |
| 8 | +ms.suite: "" |
| 9 | +ms.tgt_pltfrm: "" |
| 10 | +ms.topic: "article" |
| 11 | +applies_to: |
| 12 | + - "Dynamics 365 (online)" |
| 13 | + - "Dynamics 365 Version 9.x" |
| 14 | + - "powerapps" |
| 15 | +author: "Mattp123" |
| 16 | +ms.assetid: |
| 17 | +caps.latest.revision: |
| 18 | +ms.author: "matp" |
| 19 | +manager: "kvivek" |
| 20 | +tags: |
| 21 | +search.audienceType: |
| 22 | + - maker |
| 23 | +search.app: |
| 24 | + - PowerApps |
| 25 | + - D365CE |
| 26 | +--- |
| 27 | +# Connect Azure Data Lake Storage Gen2 for dataflow storage |
| 28 | + |
| 29 | +[!INCLUDE [cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)] |
| 30 | + |
| 31 | +You can configure dataflows to store their data in your organization’s Azure Data Lake Storage Gen2 account. This article describes the general steps necessary to do so, and provides guidance and best practices along the way. |
| 32 | + |
| 33 | +There are some advantages to configuring dataflows to store their definitions and datafiles in your data lake, including the following: |
| 34 | +- Azure Data Lake Storage Gen2 provides an enormously scalable storage facility for data. |
| 35 | +- Dataflow data and definition files can be leveraged by your IT department's developers to leverage Azure Data and artificial intelligence (AI) services as demonstrated in the GitHub samples from Azure Data Services. |
| 36 | +- Enables developers in your organization to integrate dataflow data into internal applications, and line-of-business solutions, using developer resources for dataflows and Azure. |
| 37 | + |
| 38 | +## Requirements |
| 39 | +To use Azure Data Lake Storage Gen2 for dataflows, you need the following: |
| 40 | +- A PowerApps environment. Any PowerApps plan will allow you to create dataflows with Azure Data Lake Storage Gen2 as a destination. You will need to be authorized in the environment as a maker. |
| 41 | +- An Azure subscription. You need an Azure subscription to use Azure Data Lake Storage Gen2. |
| 42 | +- A resource group. Use a resource group you already have, or you can create a new one. |
| 43 | +- An Azure storage account. The storage account must have the Data Lake Storage Gen2 feature enabled. |
| 44 | + |
| 45 | +> [!TIP] |
| 46 | +> If you don't have an Azure subscription, [create a free trial account](https://azure.microsoft.com/free/) before you begin. |
| 47 | +
|
| 48 | +## Prepare your Azure Data Lake Storage Gen2 for Power Platform Dataflows |
| 49 | +Before you configure Power BI with an Azure Data Lake Storage Gen2 account, you must create and configure a storage account. Here are the requirements for Power Platform Dataflows: |
| 50 | +1. The storage account must be created in the same Azure Active Directory tenant as your PowerApps tenant. |
| 51 | +2. We recommended that the storage account is created in the same region as the PowerApps environment you plan to use it in. To determine where you PowerApps environment is contact your environment admin. |
| 52 | +3. The storage account must have the Hierarchical Name Space feature enabled. |
| 53 | +4. You must must be granted an Owner role on the storage account. |
| 54 | + |
| 55 | +The following sections walk through the steps necessary to configure your Azure Data Lake Storage Gen2 account. |
| 56 | + |
| 57 | +## Create the storage account |
| 58 | +Follow the steps in the [Create an Azure Data Lake Storage Gen2 storage account](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-quickstart-create-account) article. |
| 59 | +1. Make sure you select the same ___location as your Power BI tenant, and set your storage as StorageV2 (general purpose v2). |
| 60 | +2. Make sure you enable the hierarchical namespace feature. |
| 61 | +3. We recommend that you set the replication setting to Read-access geo-redundant storage (RA-GRS). |
| 62 | + |
| 63 | +## Create a Cross-Origin Resource Sharing (CORS) rule for the Athena service |
| 64 | + |
| 65 | +> [!NOTE] |
| 66 | +> Power Platform Dataflows leverage the Athena service to connect a Data Lake to a PowerApps environment. In this section, you are required to grant the Athena service a role to the storage account, so it can be configured for Dataflow use. |
| 67 | +
|
| 68 | +Next, you need to enable the Athena service access the storage account via web browser and the PowerApps portal. Web browsers implement a security restriction known as [same-origin policy](http://www.w3.org/Security/wiki/Same_Origin_Policy) that prevents a web page from calling APIs in a different ___domain; CORS provides a secure way to allow one ___domain (the origin ___domain) to call APIs in another ___domain. For more information about CORS, see the [CORS specification](http://www.w3.org/TR/cors/). |
| 69 | + |
| 70 | +Follow the steps in the storage account you just created on the settings page in the Azure portal. In the CORS menu item, select the Blob service section and enter these details. |
| 71 | + |
| 72 | +|Setting |Value | |
| 73 | +|---------|---------| |
| 74 | +|Allowed origins | https://athena-ui-prod.trafficmanager.net | |
| 75 | +|Allowed methods | DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT, PATCH | |
| 76 | +|Allowed headers | * | |
| 77 | +|Exposed headers | * | |
| 78 | +|Max age | * | |
| 79 | + |
| 80 | + |
| 81 | +The following image shows the CORS rule configured for the Athena Service. |
| 82 | + |
| 83 | + |
| 84 | +## Connect your Azure Data Lake Storage Gen2 to PowerApps |
| 85 | +Once you've set up your Azure Data Lake Storage Gen2 account in the Azure portal, you are ready to connect it to a specific dataflow or a PowerApps environment. Connecting the lake to an environment allows other makers and admins in the environment to create dataflows that store their data in your organizations lake as well. |
| 86 | + |
| 87 | +To connect your Azure Data Lake Storage Gen2 account with the dataflow, following steps: |
| 88 | +1. Sign in to [PowerApps](https://web.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc), and verify which environment you're in. The environment switcher is located on the right side of the header. |
| 89 | +2. On the left navigation pane, select the down arrow next to **Data**. |
| 90 | + |
| 91 | +  |
| 92 | + |
| 93 | +3. In the list that appears, select **Dataflows**, and then on the command bar select **New Dataflow**. |
| 94 | + |
| 95 | +  |
| 96 | + |
| 97 | +4. Select analytical entities you want. These entities indicate what data you want to store in your organization's Azure Data Lake Store Gen2 account. |
| 98 | + |
| 99 | +  |
| 100 | + |
| 101 | +## Select the storage account to use for dataflow storage |
| 102 | +If a storage account has not yet been associated with the environment, a **Link to data lake** dialog box appear. You will need to sign in and find the data lake you created in previous steps. In this example there's no data lake associated with the environment so a prompt occurs to add one. |
| 103 | + |
| 104 | +1. Select storage account. |
| 105 | + The **Select Storage Account** screen appears. |
| 106 | +  |
| 107 | +2. Select the **Subscription ID** of the storage account. |
| 108 | +3. Select the **Resource Group name** in which the storage account was created. |
| 109 | +4. Enter the **Storage Account name**. |
| 110 | +5. Select **Save**. |
| 111 | + |
| 112 | +Once these steps are successfully completed, your Azure Data Lake Storage Gen2 account is connected to Power Platform Dataflows and you can continue to create a dataflow. |
| 113 | + |
| 114 | +## Considerations and limitations |
| 115 | +There are a few considerations and limitations to keep in mind when working with your dataflow storage. |
| 116 | +- Linking an Azure Data Lake Store Gen2 account for dataflow storage is not supported in the default environment. |
| 117 | +- Once a dataflow storage ___location is configured for a dataflow, it can't be changed. |
| 118 | +- By default, any member of the environment can access dataflow data using the Power Platform Dataflows Connector. However, only the owners of a dataflow can access its files directly in Azure Data Lake Storage Gen2. To authorize additional people to access the dataflows data directly in the lake, you must authorize them to the dataflow’s CDM folder in the data lake or the data lake itself. |
| 119 | +- When a dataflow is deleted, its CDM folder in the lake will also be deleted. |
| 120 | + |
| 121 | +> [!IMPORTANT] |
| 122 | +> You shouldn't change files created by dataflows in your organization’s lake or add files to a dataflow’s CDM folder. Changing files might damage dataflows or alter their behavior and is not supported. Power Platform Dataflows only grants read access to files it creates in the lake. If you authorize other people or services to the filesystem used by Power Platform Dataflows, only grant them read access to files or folders in that filesystem. |
| 123 | +
|
| 124 | +## Frequently asked questions |
| 125 | +*What if I had previously created dataflows in my organization’s Azure Data Lake Storage Gen2 and would like to change their storage ___location?* |
| 126 | + |
| 127 | + You can't change the storage ___location of a dataflow after it was created. |
| 128 | + |
| 129 | +*When can I change the dataflow storage ___location of an environment?* |
| 130 | + |
| 131 | + Changing the environments dataflow storage ___location is not currently supported. |
| 132 | + |
| 133 | +## Next steps |
| 134 | +This article provided guidance about how to connect an Azure Data Lake Gen2 account for dataflow storage. |
| 135 | + |
| 136 | +For more information about dataflows, CDM, and Azure Data Lake Storage Gen2, see these articles: |
| 137 | +- [Self-service data prep in PowerApps](https://go.microsoft.com/fwlink/?linkid=2099972) |
| 138 | +- [Creating and using dataflows in PowerApps](https://go.microsoft.com/fwlink/?linkid=2100076) |
| 139 | +- [Connect Azure Data Lake Storage Gen2 for dataflow storage](https://go.microsoft.com/fwlink/?linkid=2099973) |
| 140 | +- [Add data to an entity in Common Data Service](https://go.microsoft.com/fwlink/?linkid=2100075) |
| 141 | + |
| 142 | +For more information about Azure storage, see this article: |
| 143 | +- [Azure Storage security guide](https://docs.microsoft.com/azure/storage/common/storage-security-guide) |
| 144 | + |
| 145 | +For more information about the Common Data Model, see these articles: |
| 146 | +- [Common Data Model - overview](https://docs.microsoft.com/powerapps/common-data-model/overview) |
| 147 | +- [CDM folders](https://go.microsoft.com/fwlink/?linkid=2045304) |
| 148 | +- [CDM model file definition](https://go.microsoft.com/fwlink/?linkid=2045521) |
| 149 | + |
| 150 | +Ask you questions in the [PowerApps Community](https://go.microsoft.com/fwlink/?linkid=2099971). |
0 commit comments