VI Split Output Object
The Visual Integrator (VI) Split output object splits data into a set of files determined by the contents of the data. A data column in the input flow directs the output. For each unique value of the data column, an output file is created containing the corresponding data.
The Split object divides a data flow into separate output files for different sets of data. For example, you can divide sales information into separate sales team files.
The Split object can also write out a dictionary suitable for input into Visual Builder or back into VI. In addition, the Split object can write out a report file that lists the created files and the number of records written to each file. There is no limit to the number of files that the Split object can create; however, on Windows platform the open file limit is 2040.
The Split output object has three panes where you set attributes.
You set attributes for the Split output object in the object attributes pane.
Attribute | Description |
---|---|
Input |
Defines the object from which the data flow arrives. Use one of the following methods to attach the Split output object to an input data flow object:
|
Filename_Column |
As indicated by (use the grid below), you choose an input column to mark as the column used to split the data. Click the Filename column in the column grid for the input column you wish to split the data on. The output file names are based on the values in this input column and can be modified by the Filename_Prefix and Filename_Extension attributes. |
File_Type |
Defines the file type for the output file. Select one of the following values from the File_Type list:
|
Delimiter |
Specifies the delimiter that is used to separate columns for variable format files. If not specified, ASCII tab is used. Choices are:
|
NewLine |
Specifies a newline character for text output. The specified character will be used to end each output line of regular output. This attribute should not be used for XML output. If this attribute is not specified or empty, the file output object will use the default linefeed for each platform—LF (ASCII 10) for Unix systems, and CR LF (ASCII 13 10) for Windows systems. The following special values are accepted for this attribute:
NOTE: |
Filename_Prefix | Defines a string to prepend to the Filename (Filename_Column) value to create the destination file name for the row. You can use this attribute to specify a directory name or common prefix for the output files without having to define a special calculated field. |
Filename_Extension | Defines a string to append to the Filename (Filename_Column) value to create the destination file name for the row. You can use this attribute to specify a common extension (for example, .txt) for the output files without having to define a special calculated field. |
Always_Quote |
Specifies to add quotation marks to column headings and output values.
You cannot use the Always_Quote and Never_Quote simultaneously. |
Never_Quote |
Specifies to disable adding quotation marks to output values. This attribute allows for fine-grain control of quoting behavior in unusual circumstances.
You cannot use the Always_Quote and Never_Quote simultaneously. |
Create_Directory |
Defines whether to create parent directories for the output.
|
Verbose |
Determines if the individual files are listed in the VI output log.
|
Reportfile |
Specifies a name and path for an optional report file. Use the browse button or type the path and name into the box. The report file is a tab-delimited file with two columns. The first column contains the file names written by the Split output object and the second column contains the number of records written to the corresponding file. You can use this file to script a number of builds. |
Reportfile_Type |
Specifies how the columns are named in the report file. Choices are:
|
Encoding |
Defines the encoding for the output file(s). Values include:
UCS-2 and UTF-8 files can include a Byte Order Mark (BOM) at the beginning of the file to denote the file encoding. These file signatures are defined as follows:
File signatures are common for Unicode files on Windows operating systems. If the file input object reads multiple files, the signature of each file determines its encoding. If the encoding attribute is auto and no signature is found, the encoding is assumed to be latin1 if no other object in the task handles Unicode data and the VI file is not encoded as utf-8 (using the charset 1208 directive). Otherwise, the encoding is assumed to be utf-8. See also Integrator Unicode Data Support. |
Signature |
Defines whether a Byte Order Mark (BOM) is written for Unicode files.
|
Dictionary_File |
Defines a dictionary file for the output. Click the browse button to navigate to where you want to output the dictionary file. Supply a file name if the file is new. The dictionary file can be new-style or old-style format.
|
Each object has an area where you can enter comments.
It is a DI best practice to enter a note for every object in a VI script. You can set a VI preference to give a warning for each object without a note.
In the column grid, you set the Filename that indicates what the Split object uses to produce output files. You also can set which columns are kept in these output files.
Attribute | Description |
---|---|
Input Column | Displays the name of each input column. This attribute is read-only. |
Source Object | Displays the name and object type of the source object. Double-click the Source Object for a column to change the task flow focus to that object. |
Keep Order | Manages the order that columns display in the output data flow. By default, columns that are passed to the next object in the data flow are displayed in the order that they appear in the Name column. You can change this order by typing a number in the Keep Order column. When you assign a Keep Order number, the Keep column is checked automatically. The Keep Order numbers might reorder to accommodate any changes you make. |
Keep |
Manages which columns are kept in the output data flow. If no columns have a Keep check mark, all columns are kept in the output data flow, except for any explicitly marked Remove. Select the Keep check box for columns you want to explicitly keep in the output data flow. A number is automatically added in the Keep Order column when you select its Keep check box. After marking any column with a Keep check mark, only those marked Keep are kept in the output data flow. NOTE: After any Keep check boxes are checked, do not use the Remove check boxes as clicking a Remove check box sets all Keep check boxes to unchecked. |
Remove |
Manages which columns are removed from the output data flow. Select the Remove check box for columns that you want to explicitly suppress from the output data flow. NOTE: Use the Remove check boxes only when no Keep check boxes are checked. |
Filename |
Define the input column to split the data. Click the Filename column in the column grid for the input column. The Split output file names are based on the values in this input column. You can use the Filename_Prefix and Filename_Extension attributes to modify these output file names. |