How-To: Import a JSON File via the File Connector
Guide for importing JSON files into HighByte Intelligence Hub using the File Connector.
What Does This Article Cover?
This article provides guidance for processing JSON files into the Intelligence Hub using the File Connection.
Decoding JSON file in File Connection
Starting in version 4.1, the Intelligence Hub's File Connection does support reading in JSON files. There is no longer the need to convert the binary file to JSON using JavaScript. In the screenshot below, the File Connection is reading a file named Sample.json. The File Encoding is set to Auto. This will enable the JSON file to be decoded automatically. See results after pressing Test Input.
Decoding JSON file in Pipeline
Alternatively, we could set the File Encoding to Binary in the File Connection. This will provide the same behavior as previous versions of Intelligence Hub. See results after pressing Test Input.
Then, a pipeline can read the Binary data and decodes it to JSON. In this pipeline, the binary data is read into a key named BinaryFile. The SetBinaryFileAsParent transform stage moves the payload to the root of the message.
Then, the JSON Parser stage is used to decode the file to JSON. The Incoming Type = File is used to convert the Binary to JSON. This File Encoding provides the option to specify the File Encoding if the correct encoding is not determined automatically.