Output CSV/Delimited - Data360_Analyze - Latest

Data360 Analyze Server Help

Product type
Software
Portfolio
Verify
Product family
Data360
Product
Data360 Analyze
Version
Latest
Language
English
Product name
Data360 Analyze
Title
Data360 Analyze Server Help
Copyright
2024
First publish date
2016
Last updated
2024-11-28
Published on
2024-11-28T15:26:57.181000

Outputs data to a delimited text file using designated delimiters for fields and records.

To configure this node:

  1. In the Filename property, click the folder icon and browse to the file to which you want to export the data, then click Choose. To create a new file, click the folder icon and navigate to the folder where you want to output the file, then enter a name for the file in the Filename field and click Choose.

    Configure the remaining optional properties as needed. In particular, you may want to configure the FieldDelimiter and RecordDelimiter properties.

  2. In the FieldDelimiter property, specify the field delimiters. The field delimiter is the character that is used to separate the fields in the file, for example:
    • \t - Separates the fields by tabs (default).
    • , - Separates the fields by commas.
    • | - Separates the fields by pipes.
    • \\ - Separates the fields by a single backslash.
  3. In the RecordDelimiter property, specify the record delimiters. The record delimiter is the character that is used to separate consecutive records in the output file, for example:
    • \r\n - Places each row of data into separate (multiple) rows.
    • \n - Places each row of data onto a new line (default).
    • \t - Separates the records by tabs.
    • \\ - Separates the records by a single backslash.

Properties

Filename

Click the folder icon and browse to the CSV file to which you want to export the data.

Choose the (from Field) variant of this property to specify the name of an input field containing the file names.

A value is required for this property.

If the (from Field) variant is chosen, different records can be sent to different CSV files.

Note: If you are using the server edition, the output file will be created on the Data360 Analyze server. If you wish to open the file, and you don't have access to the file system on the server, you will need to download the file onto your local machine. See Download data files for more details.

FileCharacterSet

Optionally specify the appropriate character set of the CSV file to produce.

Choose the (from Field) variant of this property to specify the name of an input field containing the character set.

Select one of the provided character sets, or type the name of a character set if the one you require is not in the dropdown list.

The default value is UTF-8.

Format

Optionally specify the format of the output. You need to specify a format to write data to a non-standard CSV format as defined by RFC 4180. Choose from:

  • Excel - CSV file format as used when a file is saved as CSV from Microsoft Excel.
  • InformixUnload - Default Informix CSV UNLOAD format used by the UNLOAD TO file_name operation.
  • InformixUnloadCsv - Default Informix CSV UNLOAD format used by the UNLOAD TO file_name operation (escaping is disabled).
  • RFC4180 - Comma separated format as defined by RFC 4180.
  • TDF - Tab-delimited format.

Choose the (from Field) variant of this property to specify the name of an input field containing the output format.

The default value is RFC4180.

Field Order

Populate the table with a list of fields which specify the order in which input fields will be written in the output.

Add or remove fields in the list, any fields on the input data not specified in the list will be excluded from the output.

FieldDelimiter

Optionally specify the field delimiter. The field delimiter is the character used to separate fields in the CSV data to be exported. For example, use \t as the field delimiter for a file with fields that are separated by tabs. If the fields are separated by commas, enter the comma character "," (enter just the character, with no quotes).

Choose the (from Field) variant of this property to specify the name of an input field containing the field delimiter.

The default value is dependent on the value set in the Format property.

RecordDelimiter

Optionally specify the record delimiter. The record delimiter is the character used to separate records in the CSV data to be exported. For example, use \t as the record delimiter for a file with records that are separated by tabs.

Choose the (from Field) variant of this property to specify the name of an input field containing the record delimiter.

The default value is dependent on the value set in the Format property.

EscapeCharacter

Optionally specify an escape character (for example, backslash \).

Choose the (from Field) variant of this property to specify the name of an input field containing the escape character.

The default value is dependent on the value set in the Format property.

QuoteCharacter

Optionally specify a quote character.

The default value is dependent on the value set in the Format property.

Choose the (from Field) variant of this property to specify the name of an input field containing the quote character.

The default value is dependent on the value set in the Format property.

HeaderMode

Optionally specify how the field headers are to be written to the CSV output. Choose from:

  • None - No header will be written.
  • Untyped - The field names will be written to the CSV file as the header line.
  • Typed - The header will be written in the format fieldName:fieldType.

If Typed is selected, then the data can be read back using a CSV/Delimited node configured with the TypedHeaders property set to True.

Choose the (from Field) variant of this property to specify the name of an input field containing the header mode.

The default value is Untyped.

DateFormat

Optionally specify the format to use for date fields in the CSV output.

Select one of the provided formats, or type a valid date format if the one you require is not in the dropdown list.

Choose the (from Field) variant of this property to specify the name of an input field containing the date format.

The default value is yyyy-MM-dd.

If the HeaderMode property is set to Typed then this property should not be changed from the default value if the file is subsequently to be read using the Output CSV/Delimited node.

TimeFormat

Optionally specify the format to use for time fields in the CSV output.

Select one of the provided formats, or type a valid time format if the one you require is not in the dropdown list.

Choose the (from Field) variant of this property to specify the name of an input field containing the time format.

The default value is HH:mm:ss.

If the HeaderMode property is set to Typed then this property should not be changed from the default value if the file is subsequently to be read using the Output CSV/Delimited node.

DateTimeFormat

Optionally specify the format to use for datetime fields in the CSV output.

Select one of the provided formats, or type a valid datetime format if the one you require is not in the dropdown list.

Choose the (from Field) variant of this property to specify the name of an input field containing the datetime format.

The default value is yyyy-MM-dd HH:mm:ss.

If the HeaderMode property is set to Typed then this property should not be changed from the default value if the file is subsequently to be read using the Output CSV/Delimited node.

NullMode

Optionally specify how to handle NULL value fields. Choose from:

  • Empty Value is Null - When a Null is found, an empty value (two consecutive delimiters, e.g. ,,) will be written.
  • Quoted Empty Value is Null - When a Null is found, an empty value surrounded by quotes (e.g. ,””,) will be written.
  • Custom Value is Null - When a Null is found, a custom value (defined by NullString) will be written.
  • Custom Quoted Value is Null - When a Null is found, a custom value surrounded by quotes (defined by NullString) will be written.
  • None - When a Null is found, the node will error.

Choose the (from Field) variant of this property to specify the name of an input field containing the null mode.

The default value is Empty Value is Null.

NullString

Optionally specify a value to be output when the field value is NULL and the NullMode is set to either Custom Value is Null or Custom Quoted Value is Null.

Choose the (from Field) variant of this property to specify the name of an input field containing the replacement string.

InputSorted

Optionally specify whether the input is sorted according to the values of the field specified in the Filename property.

If the Filename property is not specified using the (from Field) variant then this property has no effect.

Otherwise, if set to True the node behavior is optimized and does not need to keep multiple files open while processing the input records.

If set to False all files referenced in the field specified in the Filename property will be kept open until the node has completed processing all input records.

If the node is to write to many (e.g. thousands of) different output files, then the node may experience performance and memory problems if the input is not sorted.

Therefore in such cases it is recommended to sort the input first and set this property to True.

The default value is False.

FileExistsBehavior

Optionally specify what happens if the CSV file to write to already exists on the file system.

Choose from:

  • Error - The node will error.
  • Overwrite - The target file will be overwritten.

The default value is Error.

BadEncodingBehavior

Optionally specify the node behavior if the input data cannot be encoded in the target file character set.

Choose from:

  • Report - The error will be reported and the node will error.
  • Ignore - The characters which cannot be encoded will be ignored.
  • Replace with ? - The characters which cannot be encoded will be replaced with a replacement character ('?').
  • Replace with Custom - The characters which cannot be encoded will be replaced with a custom character as specified in the BadEncodingBehaviorReplacementCharacter property.

Choose the (from Field) variant of this property to specify the name of an input field containing the node behavior.

The default value is Report.

BadEncodingBehaviorReplacementCharacter

If the BadEncodingBehavior property is set to Replace with Custom specify the replacement character.

FieldsNotExistBehavior

Optionally specify the node behavior when there are fields specified in the Field Order property that do not exist on the incoming data set.

Choose from:

  • Error - The node will error when it finds fields listed in the Field Order property that do not exist on the incoming data set. The erroneous fields will be listed in the error detail.
  • Log - A warning will be logged by the node when it finds fields listed in the Field Order property that do not exist on the incoming data set. The erroneous fields will be listed in the warning detail.
  • Ignore - No warning will be logged by the node. Any fields found in the Field Order property that do not exist on the incoming data set will be ignored.

The default value is Error.

Example data flows

A number of sample Data Flows are available from the Samples workspace, found in the Analyze Directory page.

In the Directory under the /Data360 Samples/Node Examples/ folder, you will find "Reading and Writing CSV Data", which shows examples of how to use this node.

Note: Upgrades will overwrite all data flows in the workspace. If you want to make changes to one of the sample data flows, we recommend you create a copy and save it elsewhere, using Save as...

Inputs and outputs

Inputs: in1.

Outputs: None.