Adapter type: toolkit_file_json_output. The File/Hadoop JSON Output adapter reads JSON-formatted data from a file or Hadoop Distributed File System (HDFS). Set these properties for the adapter in the ESP Studio adapter properties dialog.
If you use the CCL ATTACH ADAPTER statement to attach an adapter, you must supply the adapter type.
Property Label | Description |
---|---|
JSON Column Mapping List |
Property ID: jsonColsMappingList Type: string (Required) Specify JSONPath expressions which represent JSON data to map to ESP streams. Separate these values using commas. There are two types of JSON data: array or object. For example, if you had the following JSON data about a
person,
{ "firstName": "John", "lastName": "Smith", "phoneNumbers": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ], "friends": [ ["female1","female2","female3"], ["male1","male2","male3"] ] }you could get the individual's first name by using the JSONPath expression firstname. If you want the first phone number, specify phoneNumbers[0].number as the JSONPath expression. Each JSONPath expression must represent one record. The first JSONPath expression is mapped to the first column of an ESP stream, the second expression is mapped to the second column of an ESP stream, and so on. |
Date Format |
Property ID: jsonDateFormat Type: string (Advanced) Specify the format for parsing date values. |
Timestamp Format |
Property ID: jsonTimestampFormat Type: string (Advanced) Specify the format for parsing timestamp values. |
Charset Name |
Property ID: charsetName Type: string (Advanced) Specify the name of a supported charset. |
Directory |
Property ID: dir Type: directory (Required) Specify the location of the data files. |
File (in Directory) |
Property ID: file Type: string (Required) Specify the file to write to. |
Append Mode |
Property ID: appendMode Type: boolean (Advanced) Specify whether data should be appended to an existing file. |
PropertySet |
Property ID: propertyset Type: string (Advanced) Specifies the name of the property set. Property sets are reusable sets of properties that are stored in the project configuration file. Using these sets allows you to move adapter configuration properties out of the CCL file and into the CCR file. If you specify the same properties in the project configuration file and the ATTACH ADAPTER statement, the values in the property set override the values defined in the ATTACH ADAPTER statement. No default value. |