Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Field Name

Field Type

Description

Label*

Default ValueS3 File Reader
ExampleS3 File Reader

String

Specify a name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

File

Default Values3:///
Example:

String/Expression/Suggestion

Specifythe URL for the S3 file, from where the binary data is to be read. It must start with "s3:///". The suggest feature can be used to view the list of buckets, subdirectories and files. Bucket names are suggested if the property is empty or "s3:///". Once a bucket is selected, it can list subdirectories and files immediately below the bucket. Names of subdirectories end with a forward slash ("/"). The suggest feature is not supported if the properties in the S3 Dynamic account are parameters.

This Snap supports S3 Virtual Private Cloud (VPC) endpoint.

Note

Prerequisite

The provided account must have 'read' access to the specified S3 bucket in order to read the file successfully.

Using Expressions:

Click the Expression Enabler to enable the expressions.

For example, if the File property is "s3:///mybucket/out_" + Date.now() + ".csv" then the evaluated filename is s3:///mybucket/out_2013-11-13T00:22:31.880Z.csv.

Syntax:

Code Block
s3:///<S3_bucket_name>@s3.<region_name>.amazonaws.com/<path>

For region names and their details, see AWS Regions and Endpoints.

Note

Region Name

Region name is optional only if the region is us-east-1. In all other cases the region name must be specified based on the syntax above. For example, mybucket@eu-west-1. 

See AWS Regions and Endpoints for details.

Acceptable File Paths

  • Relative paths

    • filename.json: Saves the file in the project.

    • ../shared/filename.json: Saves the file in the Project Shared Space.

    • ../../shared/filename.json: Saves the files in the Org Shared project.

  • Absolute path

    • /<org>/<projectSpace>/<project>/filename.json

Lint Warning

The Snap displays a Lint Warning in your Pipeline in the following scenarios:

  • INCORRECT_FILE_PATH: When you provide an incorrect file path to write a file, such as not following the given relative paths pattern or absolute path patterns.

  • INCORRECT_ORG_PATH: When you create files or directories in a different org other than the one where the Pipeline is executing.

Therefore, we recommend that you confirm to any of the acceptable relative paths. Else, use an absolute path—that is provide a file path that belongs to the same org where you want to write the file, or click on the File Upload (blue star)icon to specify the File path.

Version ID

Examples:   xvcnB8gPi37l3hbOzlsRFxjVwQ.numQz

Default value:  [None]

String/Expression/Suggestion

Enter or select S3 file version ID. If the property is empty, the Snap reads the latest version. The suggest feature can be used to view the list of version IDs for the S3 file in the File property. The suggest feature is not supported if the properties in the S3 Dynamic account are parameterized. Each line in the suggested list also includes the last modified date and the file size to help select a version. When the property value is entered manually, only the version ID is required. The Snap ignores the last modified date and size information of a version when it reads the file. If the versioning of a S3 bucket is not enabled, no version ID is suggested. The versions of the following cases will be omitted in the suggested list since their files cannot be downloaded: 

  • If a file had existed before the versioning was enabled, its version does not have any version ID assigned to it.

  • Version ID's with 'Deleted Marker' resource type are also omitted in the suggested list.

Version ID suggestion interval

Use this field set to read a specific version of S3 file object. Enter the time interval for the Version ID suggestion. Enter two rows to provide a start date and an end dates. If only one row is provided, the interval will be from the date until now. If left empty, all version IDs are suggested. This property may be useful when a specific S3 file has many versions. This property is used for the Version ID suggestion only, and not used during the Snap preview or execution.

Year

Default Value: None
Example2017

Integer

Enter the year as a 4-digit integer.

Month

Default Value:  None
Example:  9, 09, 12

Integer

Enter the month as an integer.

Date

Default Value: None
Examples:  28, 09, 12

Integer

Enter the day of the month.

Zone


Default Value: None
ExampleUS/Pacific

Suggestion

Enter or select a time zone ID from the suggested list. May be empty for UTC. Please note only zone IDs in the suggested list are supported.

Enable staging

Default Value: Deselected

Checkbox

If selected, the Snap downloads the source file into a local temporary file. When the download is completed, it streams the data from the temporary file to the output view. This property prevents the Snap from being blocked by slow downstream pipeline. The local disk should have sufficient free space as large as the expected file size. 

Note

Some Snaps may take a long time to process large amounts of data. This, in turn, could lead to connection timeouts, causing the pipeline to fail. Selecting this property saves the data on your local disk, enabling you to avoid such timeouts.

Number of retries

Default value: 0
Example:  3

Minimum value: 0

Integer/Expression

Specify the maximum number of retry attempts that the Snap must make in case there is a network failure, and the Snap is unable to read the target file.

If the value is larger than 0, the Snap overrides the Enable staging value to true and downloads the S3 file to a temporary local file. If any error occurs during the download, the Snap waits for the time specified in the Retry interval and attempts to download the file again from the beginning. When the download is successful, the Snap starts to stream the data from the temporary file to the downstream Pipeline. All temporary local files are deleted when they are no longer needed.

Info

Ensure that the local drive has sufficient free disk space to store the temporary local file.

Retry interval (seconds)

Default Value: 1
Example: 3

Minimum value: 1

Integer/Expression

Specify the minimum number of seconds for which the Snap must wait before attempting recovery from a network failure.

Get Object Tags

Default value: Deselected

Checkbox

Select this checkbox to include object tags in the header of the output binary data. See Object Tagging for more information on object tags.

You must have the S3:GetObjectTagging permission to be able to use this feature.

Snap Execution

Default ValueValidate & Execute
Example: Execute only

Dropdown list

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

...

This example pipeline demonstrates how to read data from an S3 bucket using the S3 File Reader Snap.

...

Step 1: Configure pipeline parameters as shown below. Refer to Pipeline Properties for more information.

...

...

Step 2: Configure the attributes to pass raw data in the JSON Generator Snap under Edit JSON.

...