CSV Output Format Parameters

Log Parser

CSV Output Format Parameters

The CSV output format supports the following parameters:

headers
  Values: ON | OFF | AUTO
  Default: AUTO
  Description: Write a header line containing the field names.
  Details: This parameter controls the CSV header line that is output at the beginning of each file.
The possible values for this parameter are:
  • ON: always write the header;
  • OFF: never write the header;
  • AUTO: write the header only when not appending to an existing file.
  Example: -headers:OFF
 
oDQuotes
  Values: ON | OFF | AUTO
  Default: AUTO
  Description: Enclose field values within double-quote characters (").
  Details: This parameter controls whether or not the CSV output format should enclose field values within double-quote characters (").
The possible values for this parameter are:
  • ON: always enclose field values within double-quote characters;
  • OFF: never enclose field values within double-quote characters;
  • AUTO: enclose within double-quote characters only those field values that contain comma (,) characters.
  Example: -oDQuotes:ON
 
tabs
  Values: ON | OFF
  Default: OFF
  Description: Write a tab character after each comma separator.
  Details: Setting this parameter to "ON" causes the CSV output format to write a tab character after each comma field separator, in order to improve readability of the CSV output.
Note that using tabs between field values might generate output that is not compatible with certain spreadsheet applications.
  Example: -tabs:ON
 
oTsFormat
  Values: timestamp format
  Default: yyyy-MM-dd hh:mm:ss
  Description: Format of timestamp values in the output CSV data.
  Details: This parameter specifies the date and/or time format to use when formatting values of the TIMESTAMP data type.
For more information on date and time formats, see Timestamp Format Specifiers.
  Example: -oTsFormat:"MMM dd, yyyy"
 
oCodepage
  Values: codepage ID (number)
  Default: 0
  Description: Codepage of the output text.
  Details: 0 is the system codepage, -1 is UNICODE.
  Example: -oCodepage:1245
 
fileMode
  Values: 0 | 1 | 2
  Default: 1
  Description: Action to perform when an output file already exists.
  Details: This parameter controls the behavior of the CSV output format when the into-entity specifies directly or indirectly through the "multiplex" feature the name of a file that already exists.
The possible values for this parameter are:
  • 0: existing files are appended with the output;
  • 1: existing files are overwritten with the output;
  • 2: existing files are left intact, discarding the output.
  Example: -fileMode:0
 


© 2004 Microsoft Corporation. All rights reserved.