Skip To Content

Write to a CSV File

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

Usage notes

  • This output connector pairs the Text Outbound Adapter with the File Outbound Transport.
  • The registered server Folder can be specified using either 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.
  • As a best practice, use absolute paths, for example C:\GeoEvent\input, for the Folder property.
  • The Subfolder property allows a subfolder relative to the registered server folder to be specified.
  • If you restart the output, GeoEvent Server will create a new file in the registered system folder path.
  • Depending on the rate and volume of processed GeoEvents, it is recommended to increase the File Rollover Size (KB) beyond the default 1 to avoid creating a cascade of delimited text files which Windows cannot keep up with.
  • A Message Separator and an Attribute Separator are required to adapt processed GeoEvents as delimited text.
  • The File Extension property 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 that Output Date Format be left as ISO 8601 Format if the data in the delimited text file is going to be used as a future data source with GeoEvent Server. GeoEvent Server prefers date/time values to be expressed in the ISO 8601 Format, however other expected date formats can be specified and used.

Parameters

ParameterDescription

Name

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

Folder

The registered system folder beneath which files will be created and written to.

Filename Prefix

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

Example: A filename prefix of output created on March 19, 2019 at 2:30:05 pm, would result in a file named output2019-03-19_14-30-05.out.

Subfolder

Specifies the name of a subfolder (or subdirectory) relative to the registered system folder beneath which files will be created and written to. This parameter should be left blank if no subfolder exists. There is no default for this parameter.

Example: Specifying a registered system folder as C:\GeoEventand a subfolder as output will result in GeoEvent Servercreating its 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 Server will stop writing to a current file and will start writing to a new file. The available File Rollover Method are By Size or By Time. The default is By Time.

  • By SizeGeoEvent Server will stop writing to the current file when a specified file size threshold is met. A new file will be created when the threshold is met.
  • By TimeGeoEvent Server will stop writing to the current file when a specified age threshold is met. A new file will be created when the 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 will create a new file to start writing to. The default is 1kilobyte.

Parameter is shown when File Rollover Method is set to By Size and is hidden when set to By Time.

File Rollover Frequency

(Conditional)

Specifies the frequency in which GeoEvent Server will stop writing to the current file and instead will create a new file to start writing to. The available age-based rollover strategies include Hourly, Daily, or Monthly. The default is Hourly.

  • HourlyGeoEvent Server will stop writing to the current file and will start writing to a new file each hour.
  • DailyGeoEvent Server will stop writing to the current file and will start writing to a new file each day.
  • MonthlyGeoEvent Server will stop writing to the current file and will start writing to a new file each month.

Parameter is shown when File Rollover Method is set to By Time and is hidden when set to By Size.

File Cleanup Age (minutes)

Specifies the age, in minutes, from which old files will be managed in accordance to the File Cleanup Method. The default is 4320 minutes.

Example: Every 3 days (4320 minutes) files will either be deleted or archived.

File Cleanup Method

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

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

Archive Folder

(Conditional)

The registered system folder beneath which files that have reached the File Cleanup Age (minutes) will be archived. There is no default for this parameter.

Parameter is shown when File Cleanup Method is set to Archive and is hidden when set to Delete.

Archive Subfolder

(Conditional)

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

Parameter is shown when File Cleanup Method is set to Archive and is hidden when set to Delete.

Message Separator

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

Attribute Separator

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

File Extension

The file extension used when creating new files. The default for this property is csv, meaning GeoEvent Server will create a comma separated values file.

Output Date Format

Specifies the format of date/time values written to the file. The available output date formats are ISO 8601 Format or a Custom Format. The default is ISO 8601 Format.

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

Custom Date Format

(Conditional)

The custom format for date/time values written to the file. The custom date format should be constructed using the Java SimpleDateFormat class convention. For more information, see the SimpleDateFormat.

Parameter is shown when Output Date Format is set to Custom Format and is hidden when 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, see Java Supported Locales.


En este tema
  1. Usage notes
  2. Parameters