Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The JSON protocol handler parses JSON documents.

Options

...

  • json.write.metadata: Dumps the metadata
  • json.write.starttimestamp: Adds the starttimestamp to the key value object under the given key
  • json.write.endtimestamp: Adds the endtimestamp to the key value object under the given key

Example

PQL

JSON Protocol Handlerinput = ACCESS({source='JSON', wrapper='GenericPush', transport='File',protocol='JSON', dataHandler='Tuple',options=[], schema=[ ['symbol','String'], ['points','Double']
Code Block
languagejs
titleJSONProtocolHandler
linenumberstrue
json = ACCESS({
    source='json', 
    wrapper='GenericPull',
    transport='File',
    protocol='JSON',
    dataHandler='KeyValueObject',   
    options=[['filename','scrobbles-2006-10.json']]
})
Code Block
themeEclipse
languagejavascript
title
linenumberstrue

 

...

CQL

Code Block
themeEclipse
languagesql
titleJSON Protocol Handler
linenumberstrue
CREATE STREAM line (symbol String, points Double)   
    WRAPPER 'GenericPush'
    PROTOCOL 'JSON'
    TRANSPORT 'File'
    DATAHANDLER 'Tuple'