TSV Input Format Parameters

Log Parser

TSV Input Format Parameters

The TSV input format supports the following parameters:

iSeparator
  Values: a single character | spaces | space | tab
  Default: tab
  Description: Separator character between fields.
  Details: The "spaces" value instructs the TSV input format to consider any spacing character (space and tab) as a separator character.
  Example: -iSeparator:space
 
nSep
  Values: number of separators (number)
  Default: 1
  Description: Number of separator characters between fields in the data records.
  Details: This parameter specifies how many separator characters must appear for the characters to signify a field separator.
This parameter is usually set to a value greater than one when parsing space-separated text files in which field values can contain a single space character. In these cases, fields are usually separated by more than a single space character.
When the "fixedSep" parameter is set to "OFF", the value of the "nSep" parameter is assumed to be the minimum number of separator characters signifying a field separator.
  Example: -nSep:2
 
fixedSep
  Values: ON | OFF
  Default: OFF
  Description: Specifies whether or not the fields in the input TSV file(s) are separated by a fixed number of separator characters.
  Details: When this parameter is set to "ON", the TSV input format assumes that the number of separator characters between the fields in the input data equals exactly the value specified for the "nSep" parameter. In this case, the presence of more separator characters signifies an empty value, which is returned as a NULL value.
When this parameter is set to "OFF", the TSV input format assumes that the fields in the input data are separated by a variable number of separator characters, and the value of the "nSep" parameter is assumed to be the minimum number of separator characters signifying a field separator. In this case, additional separator characters are ignored and parsed as a single field separator, thus making it impossible for a value to be interpreted as a NULL value.
  Example: -fixedSep:ON
 
headerRow
  Values: ON | OFF
  Default: ON
  Description: Specifies whether or not the input file(s) begin with a header line.
  Details: When this parameter is set to "ON", the TSV input format assumes that each file being parsed begins with a header line, containing the labels of the fields in the file. If the "iHeaderFile" parameter is left unspecified, the TSV input format will use the field names in the first file's header as the names of the input record fields. If a value is specified for the "iHeaderFile" parameter, the TSV input format will ignore the header line in each file being parsed.
When this parameter is set to "OFF", the TSV input format assumes that the file(s) being parsed do not contain a header, and parses their first line as data records.
For more information on headers and field names, see TSV Input Format Fields.
  Example: -headerRow:OFF
 
iHeaderFile
  Values: path to a TSV file
  Default: not specified
  Description: File containing field names.
  Details: When parsing TSV files that do not contain a header line, the fields of the input records produced by the TSV input format are named "Field1", "Field2", ...
To override this behavior and use meaningful field names, this parameter can be set to to the path of a TSV file containing a header line, causing the TSV input format to use the field names in the specified TSV file's header line as the names of the input record fields. Only the first line of the specified TSV file is parsed, and eventual additional lines are ignored.
For more information on headers and field names, see TSV Input Format Fields.
  Example: -iHeaderFile:"C:\My Folder\header.tsv"
 
nFields
  Values: number of fields (number)
  Default: -1
  Description: Number of fields in the data records.
  Details: This parameter specifies the number of fields in the input data.
The special "-1" value specifies that the number of fields is to be deducted by inspecting the first line of input data.
For more information on how the number of fields is determined, see TSV Input Format Fields.
  Example: -nFields:3
 
dtLines
  Values: number of lines (number)
  Default: 100
  Description: Number of lines examined to determine field types at run time.
  Details: This parameter specifies the number of initial lines that the TSV input format examines to determine the data type of each input field.
If the value is 0, all fields will be assumed to be of the STRING data type.
For more information on how field data types are determined, see TSV Input Format Fields.
  Example: -dtLines:10
 
nSkipLines
  Values: number of lines (number)
  Default: 0
  Description: Number of initial lines to skip.
  Details: When this parameter is set to a value greater than zero, the TSV input format skips the first n lines of each input file before parsing its header line, where n is the value specified for this parameter.
  Example: -nSkipLines:5
 
lineFilter
  Values: +|-<any_string>[,<any_string>...]
  Default: not specified
  Description: Skip or consider only lines beginning with these strings.
  Details: When the value of this parameter begins with a "+" character, the TSV input format will only parse those lines beginning with one of the strings following the "+" character in the specified value. For example, the value "+Data:,Summary:" causes the TSV input format to parse only lines beginning with either "Data:" or "Summary:".
When the value of this parameter begins with a "-" character, the TSV input format will ignore those lines beginning with one of the strings that follow the "-" character in the specified value. For example, the value "-Comment,  Marker" causes the TSV input format to ignore lines beginning with either "Comment" or "  Marker".
  Example: -lineFilter:"-Meta Data:, Summary:"
 
iCodepage
  Values: codepage ID (number)
  Default: 0
  Description: Codepage of the TSV file.
  Details: 0 is the system codepage, -1 is UNICODE.
  Example: -iCodepage:1245
 
iTsFormat
  Values: timestamp format
  Default: yyyy-MM-dd hh:mm:ss
  Description: Format of timestamp values in the input data.
  Details: This parameter specifies the date and/or time format used in the input data being parsed. Values of fields matching the specified format are returned as values of the TIMESTAMP data type. For more information on date and time formats, see Timestamp Format Specifiers.
  Example: -iTsFormat:"MMM dd, yyyy"
 
iCheckpoint
  Values: checkpoint filename
  Default: not specified
  Description: Load and save checkpoint information to this file.
  Details: This parameter enables the "Incremental Parsing" feature that allows sequential executions of the same query to only process new events that have been logged since the last execution. For more information, see Parsing Input Incrementally.
  Example: -iCheckpoint:C:\Temp\myCheckpoint.lpc
 


© 2004 Microsoft Corporation. All rights reserved.