-
Notifications
You must be signed in to change notification settings - Fork 4
Template yaml file format
Yaml template file contains following fields:
Displayable name of template.
Example:
# Displayable name of template. name: "SkyHub external GNSS"
📝 That field is mandatory.
Code of template.
Example:
# Code of template. code: "magdrone"
Based on this field, a special parser is applied.
- "magdrone" - mag drone csv parser.
- "nmea" - nmea csv parser.
- any other code value - generic csv parser.
📝 That field is mandatory.
Applies to the first 10 not empty lines of the file to detect template.
Example:
# Applies to the first 10 not empty lines of the file to detect template. match-regex: "^.*RTKPOST-QT ver.+ Emlid b33$"
📝 That field is mandatory.
Type of template for parsing data. Options are CSV and ColumnsFixedWidth.
Example:
# Type of template for parsing data. file-type: CSV
Possible values:
- CSV - csv file.
- ColumnsFixedWidth - fixed width columns position file.
📝 That field is mandatory.
Format of data file.
Example of file-type: CSV:
# Type of template for parsing data. Options are CSV and ColumnsFixedWidth file-type: CSV file-format: # Applies to CSV type. 'true' if file has headers, otherwise false has-header: true # The symbol which uses to make a comment comment-prefix: '#' # The symbol used to separate the integer part from the fractional part of a number written in decimal form. Options are ',' and '.' decimal-separator: '.' # Applies to CSV type. The symbol to separate values from line in CSV file; separator: ','
Example of file-type: ColumnsFixedWidth:
# Type of template for parsing data. Options are CSV and ColumnsFixedWidth file-type: ColumnsFixedWidth file-format: # The symbol which uses to make a comment comment-prefix: '%' # The symbol used to separate the integer part from the fractional part of a number written in decimal form. Options are ',' and '.' decimal-separator: '.' # Applies to ColumnsFixedWidth files. The length of every data column to parse information column-lengths: [23, 15, 15, 11, 4, 4, 9, 9, 9, 9, 9, 9, 7]
📝 That field is mandatory.
This field is complex and contains the following fields in its composition:
The symbol which uses to make a comment.
Example
file-format: # The symbol which uses to make a comment. comment-prefix: '#'
Applies to CSV type. The symbol to separate values from line in CSV file.
Example
file-format: # Applies to CSV type. The symbol to separate values from line in CSV file. separator: ','
The symbol used to separate the integer part from the fractional part of a number written in decimal form. Options are ',' and '.'
Example
file-format: # The symbol used to separate the integer part from the fractional part of a number written in decimal form. Options are ',' and '.' decimal-separator: '.'
'true' if file has headers, otherwise false.
Example
file-format: # Applies to CSV type. 'true' if file has headers, otherwise false has-header: true
Applies to ColumnsFixedWidth files. The length of every data column to parse information.
Example
file-format: # Applies to ColumnsFixedWidth files. The length of every data column to parse information column-lengths: [23, 15, 15, 11, 4, 4, 9, 9, 9, 9, 9, 9, 7]
Mapping data from source file to data. Requierd fields (latitude, longitude, trace number, time and date or date-time)
Example of file-type: CSV:
# Mapping data from source file to data. Requierd fields (latitude, longitude, time and date or date-time) data-mapping: latitude: header: Latitude longitude: header: Longitude altitude: header: Altitude time: header: Time format: 'H:mm:ss.fff' date: header: Date format: 'yyyy/MM/dd' trace-number: header: "zGPR:Trace"
📝 That field is mandatory.
This field is complex and contains the following fields in its composition:
Fields: latitude, longitude, altitude, timestamp, trace-number are fields of the same type, which consists of three fields:
- header - the name of column with data for CSV file type (file-type: CSV).
- index - the index of column with data for column fixed width file type (file-type: ColumnsFixedWidth).
- regex - regular expression for data extraction.
Fields: time, date-time are fields of the same type, which consists of five fields:
- header - the name of column with data for CSV file type (file-type: CSV).
- index - the index of column with data for column fixed width file type (file-type: ColumnsFixedWidth).
- regex - regular expression for data extraction.
- format - string format of value.
- type - type of value (Supported values are: UTC and GPST)
Field: date consists of six fields:
- header - the name of column with data for CSV file type (file-type: CSV).
- index - the index of column with data for column fixed width file type (file-type: ColumnsFixedWidth).
- regex - regular expression for data extraction.
- format - string format of value.
- type - type of value (Supported values are: UTC and GPST, default valie is UTC)
- source - source of value (Supported values are: Column and FileName, default value is Column)
Latitude data source.
Example
data-mapping: latitude: index: 1
Longitude data source.
Example
data-mapping: longitude: header: GNSS:Longitude
Altitude data source.
Example
data-mapping: altitude: header: Altitude
Timestamp data source.
Example
data-mapping: timestamp: header: 'Timestamp [ms]'
Trace number data source.
Example
data-mapping: trace-number: header: "GPR:Trace"
Time data source.
Example
data-mapping: time: header: GNSS:Time format: 'H:mm:ss.fff'
DateTime data source.
Example
data-mapping: date-time: index: 0 format: 'yyyy MM dd HH:mm:ss.fff' type: UTC regex: '\d{4} \d{2} \d{2} \d{2}:\d{2}:\d{2}.\d{3}'
Date data source.
Example
data-mapping: date: regex: '\d{4}-\d{2}-\d{2}' format: 'yyyy-MM-dd' source: FileName
First Lines which do not contain any data and have to be skipped.
Example
# First Lines which do not contain any data and have to be skipped skip-lines-to: # Skip lines until the first matching is found match-regex: >- ^\s*Timestamp # Skip matched line or not; skip-matched-line: false
This field is complex and contains the following fields in its composition:
Skip lines until the first matching is found.
Example
# First Lines which do not contain any data and have to be skipped skip-lines-to: # Skip lines until the first matching is found match-regex: >- ^\s*Timestamp
Skip matched line or not.
Example
# First Lines which do not contain any data and have to be skipped skip-lines-to: # Skip lines until the first matching is found # Skip matched line or not; skip-matched-line: false