This chapter describes how to configure the AWK parser.
- You are in the File Connector user interface.
- The Parsers page is open.
- Select New Configuration > AWK Parser Configuration.
- In the New parser configuration dialog, complete the following fields:
- Enter a unique Configuration Name.
- Enter a Description.
- Enter the Program you have created for your parser.
- Enter the Extension for the AWK file output.
- Select Save.
- (Optional) To test the parser, select Parser Test or manually select of a file to parse.
- Files that were successfully processed are displayed in Directory page.
Example for a parsing program
Example of a CSV file to be imported:
In this example file, the Name has position 1, the Date and Time position 2 and the Value position 3, the Unit position 4.
To parse this file, the following code can be used:
BEGIN { FS="," }; { print $1,ptime("02.01.2006 15:04",$2),$3,$4,"status" }
The File Connector's AWK parser has a built-in helper function for the time stamps. For more information, see Troubleshooting.