Component family |
Cloud/Box |
|
Function |
This component uploads data to Box from either a local file or a given data |
|
Purpose |
The tBoxPut component uploads files to a Box account. |
|
Basic settings |
Use existing connection |
Select this check box and in the Component List click the |
Connection/Client Key |
Enter the client key required by Box to access the Box API. To obtain the client key and |
|
Connection/Client Secret |
Enter the client secret required by Box to access the Box API. To obtain the client key and |
|
Connection/Access Token |
Enter the access token required by Box to access a Box account and operate it. For how to get |
|
Connection/Refresh Token |
Enter the refresh token required by Box to refresh the access token automatically. For how to |
|
|
Connection/Use HTTP proxy |
If you are using a proxy, select this check box and enter the host and port information of |
Remote Path |
Enter the path pointing to the file you need to write contents in. This file will be |
|
Replace if Existing |
Select this check box to use the uploaded file to replace the |
|
Upload mode |
Select the upload mode to be used:
|
|
Schema and Edit schema |
A schema is a row description. It defines the number of fields to be processed and passed on Note that the schema of this component is read-only with a single The Schema field is not available when you have |
|
Advanced settings |
tStatCatcher Statistics |
Select this check box to collect log data at the component |
Global Variables |
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see Talend Studio |
|
Usage |
This component is used either standalone in a Subjob to directly upload a local file to |
|
Limitation |
n/a |
In this scenario, a three-component Job consisting of three Subjobs is created to upload a
file to Box and then download a file from Box to the local file system.
Before replicating this scenario, you need to create an account at https://developers.box.com/ and then create a Box App under the Box account
to be used. For more information about Box App, see https://app.box.com/developers/services/edit/. The client key and client
secret can be obtained from the account application settings. For how to get the access
token and refresh token, see the sample App at https://github.com/box/box-java-sdk-v2/wiki/HelloWorld.
-
In the Integration perspective of the Studio, create
an empty Job from the Job Designs node in
the Repository tree view.For further information about how to create a Job, see Talend Studio User Guide.
-
In the workspace, enter the name of the component to be used and select this component
from the list that opens. In this scenario, the components are tBoxConnection, tBoxPut and tBoxGet. -
Connect tBoxConnection to tBoxPut using the Trigger >
OnSubjobOk link. -
Connect tBoxPut to tBoxGet
using the Trigger > OnSubjobOk link.
-
Double-click tBoxConnection to open its Component view.
-
Enter the client key, client secret, access token and refresh token in double quotation
marks in the relevant fields for accessing the Box account. -
Double-click tBoxPut to open its
Component view. -
Select the Use Existing Connection check box to reuse
the connection created by tBoxConnection.In the Remote Path field, enter the
destination path where you want to upload the file.In the Upload mode area, select Upload Local File. In the File field, enter the file path or browse to the file you
want to upload. -
Double-click tBoxGet to open its
Component view. -
Select the Use Existing Connection check
box to reuse the connection created by tBoxConnection.In the Path field, enter the path of the
file that you want to download.Select the Save As File check box. In the
Save To field, enter the file path
where to save the file on the local file system. -
Save the Job.