Categories

Versions

You are viewing the RapidMiner Studio documentation for version 9.0 -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. Bothreadandwriteoperations 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. 人事处en theManage Connectionsdialog in RapidMiner Studio by going toManage Connections IconTools > Manage Connections.

  2. Click onAdd ConnectionAdd Connection Iconin the lower left:

  3. Enter a name for the new connection and selectCloud Data IconAmazon S3 Connectionas theConnection 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 theConnection Test IconTestbutton.

  5. ClickSave Icon保存所有更改to save your connection and close theManage Connectionswindow. You can now start using the Amazon S3 operators!

Read from Amazon S3

TheRead Amazon S3operator 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 asCreate Document,Read Excel, orRead XML.

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

  1. 人事处en a new processNew Process Iconin RapidMiner Studio, drag theRead Amazon S3operator into theProcessview, and connect its output port to the result port of the process:

  2. Select your Amazon S3 connection from theconnectiondrop down menu in theParametersview.

  3. Click on thefilechooser buttonfile chooser iconto view the files in your Amazon S3 account. Select the file that you want to load and clickFile Chooser Icon人事处en.

    As mentioned above, theRead Amazon S3operator 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 theRead Documentoperator.

  4. Add aRead Documentoperator between theRead Amazon S3operator and the result port:

  5. RunRun Processthe process! In theResultsperspective, 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 theWrite Amazon S3operator. It uses the same connection type as theRead Amazon S3operator and has a similar interface.