Fixed Width Formatter
Overview
This Snap provides fixed width formatting for the column values and writes binary data to the output view. Fixed width format for columns has data where every field will have a fixed width. For those fields values where their width is less than the specified width, they will be padded with spaces. The field width is user configurable.
Format-type Snap
Does not support Ultra Tasks
Prerequisites
- A valid account with the required permissions.
Snap views
| View | Description | Examples of upstream and downstream Snaps |
|---|---|---|
| Input | This Snap has exactly one document input view, where it will receive the document data to be formatted into fixed width binary data. | JSON Generator |
| Output | This Snap has exactly one binary output view, where it provides a binary data stream containing the fixed width data. | Group By Fields |
| 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: Fixed Width Formatter Example: Fixed Width Formatter |
| Skip lines | String/Expression | Number of lines to skip at beginning of the data. Default value: 0 Example: 2 |
| Line separator | String/Expression |
The character used to separate lines in the output. Enter "\n" to separate the lines with a new line character.
Default value: \n |
| Add header | Checkbox |
This option specifies whether the Snap should write the field names while writing the formatted data to the output.
Default status: Selected |
| Field configuration | Details to be filled for each field that is required in the output. | |
| Input field | String/Expression |
Required. Field name to be used while writing the header.
Default value: [None] Example: First Name; Last Name |
| Field width | String/Expression |
Required. Fixed width for the field. If the value for this
field is less than the specified width, the value will be padded with spaces. Default value: [None] Example: 25 |
| Format type | Dropdown list |
Required. The format type to be performed on the field value
when the field width is less than the specified width. The options available
include:
Default value: None Example: Suffix with spaces |
| Action | Dropdown list |
Required. Action to be performed when the existing field
value is larger than the specified width.
Default value: [None] Example: Write to error view |
| Null-safe access | Checkbox |
|
| Snap execution | Dropdown list |
Select one of the three modes in which the Snap executes.
Default value: Execute only Example: Validate & Execute |