Write File

From Clariopedia

Jump to: navigation, search

Contents


Write File Node
Write File Node

Overview

The clario® node Write File is used to write files out in either a delimited or fixed-length flat line.

Usage

Input Stream

The node connector can be connected to a variety of nodes, (ie. Read, Aggregate, Outliers, Missing, etc.), but requires a valid stream of data.

Configuration

The Write File node has two configuration faces: Define File, and Define Attributes.

Define File
Define File
Define File
The first step within the node is to click on the browse button […] to launch the file browser. In the blank field at the bottom left of the file browser popup, enter the name of the file to be written (including file type suffix such as .csv, .dat, .txt, etc… if desired) and click [OK]. Or, Select the desired file from the list and click [OK]. This will cause the selected file to be overwritten. In order to NOT overwrite the selected file, modify the file name to be unique. Once a file has been selected, you can click the raw file preview button to display the first 50 rows of the selected file, unformatted. But you can only view the data once it is created, after the run.

The second step is to select the file type from the drop-down menu. Options are “delimited” or “fixed”.

For delimited data files, specify the field delimiter (such as a comma, pipe, tab, semi-colon, etc.), and, if desired, check ‘Enclosure’ box and specify the field enclosure (single quote or double quote). Leave this empty if you do not want an enclosure.

To include a header row of attribute names in the output data file, click on the Include Header Row check box. Even though this option is available for both delimited and fixed format files, it is really only useful for delimited files. If used with fixed files, the attribute name will be truncated to the length of the data field it identifies.
Define Attributes
Define Attributes
Define Attributes

Depending on whether the file type being written is delimited or fixed determines what steps to take within the define attributes face. If file type is delimited, for each attribute in the data file the Name and Type are required, while Format is optional for all the attributes. If the file type is fixed then for each attribute in the data file, Name, Type, Start Position and Length are required, while Format is optional once again. The Name and Type are populated from the input data stream's metadata. For each attribute, enter a valid Start Position and Length.

     Valid Attribute Names – there is no limit to the length of attribute names.

     Valid Types – String, Number, and Date

     Valid Formats – For date, valid formats are listed in a drop-down box

Field Definitions

  • Valid Inputs – You must link to a valid data stream (ie. Read, Missing, Outliers, Sort, etc.).
  • You must first enter a file name
  • Then you must select a file type
  • If “File Type” is <DELIMITED>, you must select a delimiter in the drop down list of “Delimiter”.
  • If "Enclosure" checkbox is selected a value must be present in the "Enclosure" field.
  • Start Position and Length are required for fixed-length files.
  • Available formats are as follows:

Number

As Is (Default)

Integer

  1. .#
  1. .##
  1. .###
  1. .####
  1. .#####
  1. .######

Date

If an attribute's type is defined as a date, you must define a format.


Results

There is no results face for the Write node. Formatted file preview can be used to view a sample of the file that has been written out. It is assumed the Write node will be used to write out a dataset to be read in for future use in a data stream.

Output Stream

The dataset is ready for immediate use in a Read node.

Video Demonstration

References

None.


Retrieved from "/wiki/index.php/Write_File"
Personal tools