Using the Dropbox Connector
This guide targets the new Connection Management introduced with RapidMiner Studio 9.3.
For the old Legacy Dropbox Connections see the9.2 documentation
The Dropbox Connector allows you to read and write to files in your Dropbox account directly from RapidMiner Studio. There is no need for the Dropbox desktop client to be installed on your machine. This document will walk you through how to:
The Dropbox Connector uses an authentication mechanism calledOAuth 2.0. Instead of giving RapidMiner your username and password, you generate an access token that can be used by RapidMiner Studio to connect to your Dropbox account. This token cannot be used by any other applications and helps keep your Dropbox credentials secure.
Follow these steps to connect RapidMiner Studio to Dropbox:
Connect to your Dropbox account
In RapidMiner Studio, right-click on the repository you want to store your Dropbox Connection in and chooseCreate Connection.
You can also click onConnections > Create Connectionand select theRepositoryfrom the dropdown of the following dialog.
Give a name to the new connection, and setConnection TypetoDropbox:
Click onCreateand switch to theSetuptab in theEdit connectiondialog.
To the right of theAccess Tokenfield, click thebutton to request an access token.
Click onRequest access token要在您的浏览器中打开网站Dropbox。如果哟u are not already logged into your Dropbox account, you will have to do so now. You can manually copy the URL by clicking onShow URL instead.
ClickAllowto give RapidMiner access to your Dropbox account and to generate a token:
Copy the access token:
Return to RapidMiner Studio, enter the access token, and clickComplete:
While not required, we recommend testing your new Dropbox Connection by clicking theTest connectionbutton at the bottom of theEdit connectionwindow:
If the test fails, check whether you copied the complete access token.
Close theEdit connectiondialog by clicking onSave.
You have successfully connected RapidMiner Studio to your Dropbox account. The next sections will show you how to use this connector to read and write files.
Browse and read files
Reading files from Dropbox is incredibly simple using the Dropbox Connector:
Drag aRead Dropboxoperator into theProcess Panel. Select your Dropbox Connection for theconnection entryparameter from the Connections folder of the repository you stored it in by clicking on thebutton next to it:
Alternatively, you can drag the Dropbox Connection from the repository into theProcess Paneland connect the resulting operator with theRead Dropboxoperator.
Click on thefilechooser buttonto view the files in your Dropbox account. Select the file that you want to load and clickOpen.
Connect the output ofRead Dropboxto a suitable operator. In this case, we selected a .XLS file, so we will connect the output to aRead Exceloperator:
As you can see in this example, theRead Dropboxoperator works similarly to theRead Fileoperator. It onlyloadsthe selected file but does notprocessit. The actual processing of the data takes place in additional operators such asRead Excel,Read CSV, orRead XML.
Write files to your Dropbox account
TheWrite Dropboxoperator works similarly to the写文件operator: it expects a file as input (provided by another operator) and stores it at the specified location in your Dropbox account. As for theRead Dropboxoperator, you can optionally provide the Dropbox Connection at the second port.
The simplest example using theWrite Dropboxoperator would be to connect it to the output ofRead Dropbox. This setup would simply copy a file from one location in your Dropbox account to another without changing the file itself.
We will configure theWrite Dropboxoperator from the end of theprevious section.
Click on theWrite Dropboxoperator, select your Dropbox Connection in theParametersview, and select a location for the new file via the file chooser. Note that by default theWrite Dropboxoperator does not overwrite existing files. Instead, a number is appended to the file name. For example, ifAnalysis_Results.xlsalready exists, the new file would be stored asAnalysis_Results (1).xls. You can disable this feature by checking the覆盖parameter (visible inExpert Mode).
Runthe process and navigate to the location you specified. In the Dropbox online view, you can see thatAnalysis_Results.xlswas successfully updated just a few seconds ago!