Document to Binary
Overview
You can use this Snap to transform document data into binary data. This Snap converts the
value of the content key in the input document to binary data at the output
view.
Transform-type Snap
Works in Ultra Tasks
Snap views
| View | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input | This Snap has at most one input view which is a document with a "content" key/value pair. The value of the "content" key should be a byte array, a string, or a character array. |
|
| Output | The output view provides the binary data copied from the value of the "content" key in the input document. If the input document contains fields other than the "content" key/value pair, the additional input data is inserted into the header part of the output binary data. One use case would be to connect Salesforce Attachment Download Snap as an upstream Snap to download a file attached to an SObject record. |
|
| Error |
Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:
Learn more about Error handling in Pipelines. |
|
Snap settings
- Expression icon (
): Allows using pipeline parameters to set field values dynamically (if enabled). SnapLogic Expressions are not supported. If disabled, you can provide a static value.
- SnapGPT (
): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
- Suggestion icon (
): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
- Upload
: Uploads files. Learn more.
| Field / Field set | Type | Description |
|---|---|---|
| Label | String |
Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline. Default value: Document to Binary Example: Document_to_Binary |
| Encode or Decode | Dropdown list | Select if the content should be Base64 encoded or Base64 decoded or none
(BYTE_ARRAY). The options are:
If the input
Default value: ENCODE_BASE64 Example: BYTE_ARRAY |
| Binary header properties | Use this fieldset to specify the properties. Note:
|
|
| Expression | String/Expression |
Specify the value to use for a property in the binary header. Default value: None |
| Target Path | String | Enter the target JSON path where the value from the expression will be
written. Default value: None Example: $['content-location'] |
| Snap execution | Dropdown list |
Choose one of the three modes in
which the Snap executes. Available options are:
Default value: Validate & Execute Example: Execute only |