Skip To Content

Write to a CSV File

The Write to a CSV File output connector can be used to write event records, adapted as text, to a delimited text file. The text delimiter is usually a comma, so this type of output file is sometimes referred to as a comma-separated values file, but ArcGIS GeoEvent Server can use any normal ASCII character as a delimiter to separate data attribute values.

Usage notes

Keep the following in mind when working with the Write to a CSV File output connector:

  • This output connector pairs the text outbound adapter with the file outbound transport.
  • The registered server folder can be specified using an absolute path or UNC path.
  • If a UNC path is used, the Windows service account running GeoEvent Server needs read/write permission to the folder.
  • Use absolute paths as a best practice. For example, C:\GeoEvent\output, for the Folder parameter.
  • The Subfolder parameter allows a subfolder relative to the registered server folder to be specified.
  • If you restart the output, GeoEvent Server creates a new file in the registered system folder path.
  • Depending on the rate and volume of processed event records, it is recommended that you increase the File Rollover Size (KB) parameter beyond the default value of 1 to avoid creating a cascade of delimited text files that Windows cannot keep up with.
  • The Message Separator parameter and an Attribute Separator parameter are required to adapt processed event records as delimited text.
  • The File Extension parameter can be used to specify the type of delimited text file created by GeoEvent Server. While the default for this output connector is csv, other file extensions can be specified, such as txt or out, to create different delimited text files.
  • It is recommended the Output Date Format parameter be set to ISO 8601 Format. Date and time values expressed in the ISO 8601 format are preferred for GeoEvent Server, however, other expected date formats can be specified and used.

Parameters

The parameters for the Write to a CSV File output connector are described below:

ParameterDescription

Name

A descriptive name for the output connector used for reference in GeoEvent Manager.

Folder

The registered system folder under which files are created and written to.

Filename Prefix

Specifies the name of the output file GeoEvent Server creates and writes to. Appended to the file name is the date/time when the file was first created. The default is output.

For example, a file name prefix of output created on March 19, 2019 at 2:30:05 p.m. would result in a file named output2019-03-19_14-30-05.out.

Subfolder

The name of a subfolder (or subdirectory) relative to the registered system folder under which files are created and written to. Leave this parameter blank if no subfolder exists.

For example, specifying a registered system folder as C:\GeoEventand a subfolder as output results in GeoEvent Servercreating the file at C:\GeoEvent\output assuming the file path exists and is accessible by the Windows service account running ArcGIS GeoEvent Server.

File Rollover Method

Specifies the method used to determine when GeoEvent Serverstops writing to a current file and starts writing to a new file. The options are By Size and By Time. The default is By Time.

  • By SizeGeoEvent Server stops writing to the current file and creates a new file when a specified file size threshold is met.
  • By TimeGeoEvent Server stops writing to the current file and creates a new file when a specified age threshold is met.

File Rollover Size (KB)

(Conditional)

Specifies the maximum size, in kilobytes (KB), a file can reach before GeoEvent Server stops writing to it. Once the maximum file size has been reached, GeoEvent Server creates a new file to start writing to. The default is 1kilobyte.

This parameter is shown when File Rollover Method is set to By Size and is hidden when it's set to By Time.

File Rollover Frequency

(Conditional)

Specifies the frequency in which GeoEvent Server stops writing to the current file and instead creates a new file to start writing to. The available age-based rollover options are Hourly, Daily, and Monthly. The default is Hourly.

  • HourlyGeoEvent Server stops writing to the current file and starts writing to a new file each hour.
  • DailyGeoEvent Server stops writing to the current file and starts writing to a new file each day.
  • MonthlyGeoEvent Server stops writing to the current file and starts writing to a new file each month.

This parameter is shown when File Rollover Method is set to By Time and is hidden when it's set to By Size.

File Cleanup Age (minutes)

Specifies the age, in minutes, from which existing files are managed in accordance with the File Cleanup Method parameter. The default is 4320 minutes.

For example: Every three days (4,320 minutes) files are either deleted or archived.

File Cleanup Method

The method used for managing existing files that have reached the File Cleanup Age (minutes) value. The file cleanup options are Delete and Archive. The default is Delete.

  • Delete—Files that have reached the age specified by the File Cleanup Age (minutes)parameter are deleted.
  • Archive—Files that have reached the age specified by the File Cleanup Age (minutes) parameter are archived.

Archive Folder

(Conditional)

The registered system folder under which files that have reached the File Cleanup Age (minutes) value are archived.

This parameter is shown when File Cleanup Method is set to Archive and is hidden when it's set to Delete.

Archive Subfolder

(Conditional)

The subfolder relative to the Archive Foldervalue under which files that have reached the File Cleanup Age (minutes) value are archived. Leave this parameter unspecified if there is no subfolder for archiving files. There is no default for this parameter.

This parameter is shown when File Cleanup Method is set to Archive and is hidden when it's set to Delete.

Message Separator

The literal character used as an event record delimiter. The default is \n for newline.

Attribute Separator

The literal character used as an attribute field delimiter. The default is a comma.

File Extension

The file extension used when creating files. The default for this parameter is CSV.

Output Date Format

Specifies the format of date/time values written to the file. The output date format options are ISO 8601 Format and Custom Format. The default is ISO 8601 Format.

  • ISO 8601 Format—Processed date/time values are constructed in adherence to the ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSSXXX).
  • Custom Format—Processed date/time values are constructed in adherence to a custom format using the JavaSimpleDateFormat class convention.

Custom Date Format

(Conditional)

The custom format for date/time values written to the file. Construct the custom date format using the JavaSimpleDateFormat class convention. For more information, refer to the SimpleDateFormat class in the Oracle documentation.

This parameter is shown when Output Date Format is set to Custom Format and is hidden when it's set to ISO 8601 Format.

Language for Number Formatting

The locale identifier (ID) used for locale-sensitive behavior when formatting numbers from data values. The default is the locale of the machine GeoEvent Server is installed on. For more information, refer to Java Supported Locales.


Dans cette rubrique
  1. Usage notes
  2. Parameters