August 17, 2023

tS3Put – Docs for ESB 5.x

tS3Put

tS3Put_icon32_white.png

tS3Put properties

Component family

Cloud/AmazonS3

 

Function

Puts a file on to Amazon S3.

Purpose

tS3Put is designed to put a file
on to Amazon S3 for data storage.

Basic settings

Use existing connection

Select this check box and in the Component List click the
relevant connection component to reuse the connection details you already defined.

 

Access Key

The Access Key ID that uniquely identifies an AWS Account. For how
to get your Access Key and Access Secret, visit Getting Your AWS Access Keys.

 

Access Secret

The Secret Access Key, constituting the security credentials in
combination with the access Key.

To enter the secret key, click the […] button next to
the secret key field, and then in the pop-up dialog box enter the password between double
quotes and click OK to save the settings.

 

Region

Specify the AWS region by selecting a region name from the list or entering a region
between double quotation marks (e.g. “us-east-1”) in the
list. For more information about the AWS Region, see Regions
and Endpoints
.

 

Bucket

Name of the bucket on the S3 server.

 

Key

Name of the file to be saved on the S3 server.

 

File

Name of the local file to be uploaded to the S3 server.

 

Die on error

This check box is cleared by default, meaning to skip the row on
error and to complete the process for error-free rows.

Advanced settings

Config client

Select this check box to configure client parameters.

Client parameter: select client
parameters from the list.

Value: enter the parameter
value.

Not available when Use existing
connection
is selected.

 

tStatCatcher Statistics

Select this check box to collect log data at the component
level.

Dynamic settings

Click the [+] button to add a row in the table and fill
the Code field with a context variable to choose your
database connection dynamically from multiple connections planned in your Job. This feature
is useful when you need to access database tables having the same data structure but in
different databases, especially when you are working in an environment where you cannot
change your Job settings, for example, when your Job has to be deployed and executed
independent of Talend Studio.

Once a dynamic parameter is defined, the Component List
box in the Basic settings view becomes unusable.

For more information on Dynamic settings and context
variables, see Talend Studio User Guide.

Global Variables

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio
User Guide.

Usage

This component can be used alone or with other S3 components, e.g.
tS3Connection.

Log4j

The activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User
Guide
.

For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html.

Limitation

Due to license incompatibility, one or more JARs required to use this component are not
provided. You can install the missing JARs for this particular component by clicking the
Install button on the Component tab view. You can also find out and add all missing JARs easily on
the Modules tab in the Integration perspective
of your studio. For details, see https://help.talend.com/display/KB/How+to+install+external+modules+in+the+Talend+products
or the section describing how to configure the Studio in the Talend Installation and Upgrade
Guide
.

Scenario: File exchanges with Amazon S3

In this scenario, tS3Put is used to send a file to
the Amazon S3 server while tS3Get is used to get that
file.

Linking the components

  1. Drop tS3Connection, tS3Put and tS3Get onto the
    workspace.

  2. Link tS3Connection to tS3Put using the OnSubjobOk trigger.

  3. Link tS3Put to tS3Get using the OnSubjobOk
    trigger.

    use_case_ts3put_1.png

Configuring the components

  1. Double-click tS3Connection to open its
    Basic settings view.

    use_case_ts3put_2.png
  2. In the Access Key and Secret Key fields, enter the authentication
    credentials.

  3. Double-click tS3Put to open its Basic settings view.

    use_case_ts3put_3.png
  4. Select the Use existing connection check
    box to reuse the connection.

  5. In the Bucket field, enter the bucket
    name.

  6. In the Key field, enter the name of the
    file to be saved on the S3 server.

  7. In the File field, enter the file to be
    uploaded to the S3 server.

  8. Double-click tS3Get to open its Basic settings view.

    use_case_ts3put_4.png
  9. Select the Use existing connection check
    box to reuse the connection.

  10. In the Bucket field, enter the bucket
    name.

  11. In the Key field, enter the name of the
    file to be retrieved from the S3 server.

  12. In the File field, enter the local name
    of the retrieved file.

Executing the Job

  1. Press Ctrl + S to save the Job.

  2. Press F6 to run the Job.

    use_case_ts3put_5.png
  3. Go to the S3 web console:

    use_case_ts3put_6.png

    As shown above, the file has been put on to the S3 server.

  4. Refresh the S3 Browser client:

    use_case_ts3put_7.png

    This shows that the S3 Put action was performed successfully.

  5. Go to the folder where the retrieved file is saved locally:

    use_case_ts3put_8.png

    As shown above, the remote file is retrieved to the local disk, proof that
    the S3 Get action was performed successfully.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x