Categories

Versions

You are viewing the RapidMiner Studio documentation for version 9.2 - Check here for latest version

Using the Amazon S3 Connector

The Amazon S3 Connector allows you to access your Amazon S3 storage directly from RapidMiner Studio. Both read and write operations are supported. This document will walk you through how to:

Connect to your Amazon S3 account

Before you can use the Amazon S3 connector, you have to configure a new Amazon S3 connection. For this purpose, you will need the connection details of your account (at least the access key and the secret key).

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

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

  3. Enter a name for the new connection and select Cloud Data IconAmazon S3 Connection as the Connection Type:

  4. Fill in the connection details of your Amazon S3 account:

    Note that Amazon S3 supports arbitrary folder "delimiters" (symbols to separate nested folders), e.g., "/" as used for URLs or "\" as used by Microsoft Windows. If the configuration specifies the wrong delimiter, your folder structure might not be displayed correctly in RapidMiner Studio. Don't worry though, you can always change the delimiter in the connection configuration later on.

    While not required, we recommend testing your new Amazon S3 connection by clicking the Connection Test IconTest button.

  5. Click Save IconSave all changes to save your connection and close the Manage Connections window. You can now start using the Amazon S3 operators!

Read from Amazon S3

The Read Amazon S3 operator reads data from your Amazon S3 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 Create Document, Read Excel, or Read XML.

Let us start with reading a simple log file from Amazon S3.

  1. Open a new process New Process Icon in RapidMiner Studio, drag the Read Amazon S3 operator into the Process view, and connect its output port to the result port of the process:

  2. Select your Amazon S3 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 Amazon S3 account. Select the file that you want to load and click File Chooser IconOpen.

    As mentioned above, the Read Amazon S3 operator does not process the contents of the specified file. In our example, we have chosen a log file (a plain text file). This file type can be processed via the Read Document operator.

  4. Add a Read Document operator between the Read Amazon S3 operator and the result port:

  5. Run Run Process the process! In the Results perspective, you should see a single document containing the content of the log file.

You could now use further text processing operators to work with this document, e.g., to determine the commonness of certain events. To write results back to Amazon S3, you can use the Write Amazon S3 operator. It uses the same connection type as the Read Amazon S3 operator and has a similar interface.