Using the Azure Data Lake Storage Connector

The Azure Data Lake Storage Connector allows you to access your Azure Data Lake Storage Gen1 account directly from RapidMiner Studio. Both read and write operations are supported. You can also read from a set of files in an Azure Data Lake Storage directory, using the Data Cloud IconLoop Azure Data Lake Storage operator. This document will walk you through how to:

Connect to your Azure Data Lake Storage Gen1 account

Before you can use the Azure Data Lake Storage connector, you have to configure your Azure environment to support remote connection and setup a new Azure Data Lake Storage Gen1 connection in RapidMiner.

For this purpose, you need to go through the following main steps (see details below).

  • Create a web application registration on Azure portal.
  • Acquire information for the remote connection.
  • Setup and test the new Azure Data Lake Storage Gen1 connection in RapidMiner.

Step 1: Create a web application registration on Azure portal

Create and configure an Azure AD web application to allow sevice-to-service authentication with Azure Data Lake Storage Gen1 using Azure Active Directory. Go through Step 1 to Step 3 of Service-to-service authentication guide. The first step registers a web application that will provide access for RapidMiner to Azure Data Lake Storage. Note that you can use arbitrary values for Name an Sign-on URL fields. The second step describes how to get your tenant ID, the application ID for the registered application, and a key that needs to be provided in RapidMiner so that it is able to use this application. Third steps configures this Active Directory application to have access to your Data Lake Storage.

After performing those steps in your Azure tenant, you should have a web application registration that is configured to access some or all folders of your target Azure Data Lake Storage Gen1 resource. Note that for the file browser of the RapidMiner operators (see below) to work, you need to give Read and Execute access on the root directory, and on all directories where you want to allow navigation. Besides that, you need Write permission to be able to write to the cloud storage from RapidMiner. If you can work without the file browser, you can limit the permissions to the target folders / files that your operators directly use.

Step 2: Acquire information for the remote connection

To create the connection in RapidMiner, you need to acquire the following information. The previous step and linked guide described how to get them, but let's repeat the direct links here to these details.

  1. Tenant ID that identifies your company's account. Get tenant ID.
  2. Fully Qualified Domain Name of your accont. Example: if your Azure Data Lake Storage Gen1 is named contoso, then the FQDN is contoso.azuredatalakestore.net by default..
  3. Application ID and application key for the Web application you created. Get application ID and authentication key.

Step 3: Setup and test the new Azure Data Lake Storage Gen1 connection in RapidMiner

After you have all information, it is straightforward to set up your connection in RapidMiner.

  1. Open the Manage Connections dialog in RapidMiner Studio by going to Manage Connections IconConnections > Manage Connections.

  2. Click on Add Connection Add Connection Icon in the lower left:

  3. Enter a name for the new connection and select Data Cloud IconAzure Data Lake Storage Gen1 Connection as the Connection Type:

  4. Fill in the connection details of your Azure Data Lake Storage Gen1 account. Specify the tenant id, account fqdn (fully qualified domain name), client id (web application id), client key (password to access the web application).

  5. While not required, we recommend testing your new Azure Data Lake Storage Gen1 connection by clicking the Connection Test IconTest button.

  6. Click Save IconSave all changes to save your connection and close the Manage Connections window. You can now start using the Azure Data Lake Storage operators.

Read from Azure Data Lake Storage

The Data Cloud IconRead Azure Data Lake Storage operator reads data from your Azure Data Lake Storage Gen1 account. The operator can be used to load arbitrary file formats, since it only downloads and does not process the files. To process the files you will need to use additional operators such as Read CSV, Read Excel, or Read XML.

Let us start with reading a simple csv file from Azure Data Lake Storage.

  1. Open a new process New Process Icon in RapidMiner Studio and choose Blank Project from the list. Drag the Data Cloud IconRead Azure Data Lake Storage operator into the Process view, and connect its output port to the result port of the process:

  2. Select your Azure Data Lake Storage Gen1 connection from the connection drop down menu in the Parameters view.

  3. Click on the file chooser button file chooser icon to view the files in your Azure Data Lake Storage Gen1 account. Select the file that you want to load and click File Chooser IconOpen. Note that you need to have Read and Execute access to the root directory, if you want to use the file browser starting from the root folder. If you do not have that permission, you can type a path into the parameter field. If you have access to the parent folder of that path (file or directory) and Execute access up to the root folder, you can open the file browser. Or you can always use a manually typed path and use the operator with that (in that case, permission is only checked during runtime).

    As mentioned above, the Data Cloud IconRead Azure Data Lake Storage operator does not process the contents of the specified file. In our example, we have chosen a csv file (a comma separated values file). This file type can be processed via the Read CSV operator.

  4. Add a Read CSV operator between the Data Cloud IconRead Azure Data Lake Storage operator and the result port. You may set the parameters of the Read CSV operator - such as column separator -, depending on the format of your csv file:

  5. Run Run Process the process! In the Results perspective, you should see a table containing the rows and columns of your choosen csv file:

You could now use further operators to work with this document, e.g., to determine the commonness of certain events. To write results back to Azure Data Lake Storage, you can use the Data Cloud IconWrite Azure Data Lake Storage operator. It uses the same connection type as the Data Cloud IconRead Azure Data Lake Storage operator and has a similar interface. You can also read from a set of files in an Azure Data Lake Storage directory, using the Data Cloud IconLoop Azure Data Lake Storage operator. For this you need to specify the connection and the folder that you want to process, as well the steps of the processing loop with nested operators. For more details read the help of the Data Cloud IconLoop Azure Data Lake Storage operator.