Versions Compared

Key

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

In this article

...

You can use this Snap to read binary data passed as binary objects from its input view and creates a .zip file at a specified file destination.

Multiexcerpt include macro
nameMigrating from Binary to Amazon S3
templateData[]
pageFile Reader
addpanelfalse

...

Note

The archive format is automatically detected by examining the file header.  The supported formats are PKZIP and 7-Zip. 

...

Field Name

Field Type

Description

Label* 

Default ValueZipFile Write
ExampleZipFile Write

String

Specify a unique name for the Snap.

File name*


Default Value: N/A
Example: contact.zip

String/Expression

Specifies the URL of the file where the output binary data is written. The supported file protocols are:

  • sldb:

  • http:

  • sftp:

  • ftp:

  • ftps:

  • s3:

  • hdfs:

  • webdhfs:

  • smb:

  • wasb:

  • wasbs:

  • gs:

This Snap supports S3 Virtual Private Cloud (VPC) endpoint. For example, s3://my-bucket@bucket.vpce-028b7814794578709-vu0vvauy.s3.us-west-2.vpce.amazonaws.com
This property works similar to the File name property of the File Writer Snap. For additional information refer the Settings section of the File Writer Snap.

When using expressions to build a file name, ensure that the resulting file name does not contain characters that are not supported by the target platform. For example, a file name that contains the special character ":" is not supported in SMB.

Note
  • Ensure the file name does not contain '?' character because it is not supported. The Snap fails with an error if you include the '?' character.

  • When the Snap zips multiple binary data and when the File name property is an expression (such as $Filename), all file name values in the headers of the binary data should be the same. Otherwise, the Snap will throw an exception.

Multiexcerpt include macro
nameAcceptable File Paths
pageFile Writer

Multiexcerpt include macro
nameLint Warning
pageFile Writer

File action*

Default valueOverwrite
Example: Ignore

String/Expression

The action to perform if the file already exists. The options available include:

  • Overwrite: If Overwrite is selected, the Snap attempts to write the file without checking for the file's existence for  better performance and the "fileAction" field will be "overwritten" in the output view data.

  • Ignore: The Snap does not overwrite the existing file and will do nothing but write the status and file name to its output view.

  • Error:  If Error is selected, the error displays in the Pipeline Run Log. If an error view is defined, the error will be written there as well.

Info

Write files to Azure Blob Storage along with Content Type

You can prevent the Snap from writing files always to Azure Blob Storage (WASB: or WASBS: file protocol) with the application/octet-stream content-type. To do so, configure a binary header property in an upstream Snap, such as JSON Formatter or Mapper, to match the file contents – application/zipapplication/java-archive and so on; and pass it as the $content-type (case-sensitive) for the file.

Binary header property in upstream Snap

Note

For wasb:// and wasbs:// file protocols, only the Overwrite file action is supported.

Base directory

Default Value: N/A
Example: testFolder

String

The root directory for all the files added to .zip file.

Use input view label

Default Value: Deselected  

Checkbox

If true, the input view label is used for all names of the files added to the zip file. Otherwise, the input view ID is used instead, when input binary stream does not have its content-location in its header. When this option is selected, if there are more than one binary input streams in an input view, for the second input stream and after, the file names will be the input view label appended with '_n'. If the label is in the format of 'name.ext', '_n' will be append to the 'name', e.g. name_2.ext for the second input stream.

If you select this option, and  if Base directory is testFolder and the input view label is test.csv, the file name for the first binary input stream in that input view will be testFolder/test.csv, and the second, testFolder/test_2.csv, and the third, testFolder/test_3.csv, and so on.

Number of retries

Default Value: 0
Example3

Integer/Expression

Specifies the maximum number of retry attempts when the Snap fails to write. If the value is larger than 0, the Snap first stores the input data in a temporary zip file before writing to the target file.

Ensure that the local drive has sufficient free disk space as large as the expected target file size.

Minimum value: 0

Retry interval (seconds)

Default Value: 1
Example: 3

Integer/Expression

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

Minimum value: 1

AWS Canned ACL

Default Value: 1
Example: PublicRead

The predefined ACL grants (from AWS) to use when writing a file to S3. Choose a Canned ACL from the available options:

  • None

  • Private

  • PublicRead

  • PublicReadWrite

  • AuthenticatedRead

  • LogDeliveryWrite

  • BucketOwnerRead

  • BucketOwnerFullControl

  • AwsExecRead

Watch the video for more information about AWS Canned ACL.

Learn more about AWS Canned ACLs.

Note

This field appears only when your account type is set to AWS S3.

Advanced properties

Use this field set to define additional properties for the Snap.

SAS URI

Dropdown

The URI of the Shared Access Storage (SAS) to be accessed. Supported SAS types are:

  • Service SAS on container

  • Service SAS on blob

  • Account SAS

Note

If you specify the SAS URI value in the Snap settings, then the settings provided in the account (if any account is attached) are ignored.

Values

String/Expression

Provide a value for the SAS URI.

Multiexcerpt include macro
nameSnap Execution
pageSOAP Execute

Dropdown list

Multiexcerpt include macro
nameSnap_Execution_Introduced
pageAnaplan Read

...