This operator can be used to transform element with other protocol handler, e.g. read a complete document from a server and then parse this document with csv or xml

Parameter

  • protocol: The protocol parameter defines the application protocol to transform the processing results.
  • inputDatahandler: This parameter defines the input format
  • outputDatahandler: This parameter defines the transform of the single attributes of the processing results.
  • options: Transport protocol and application protocol depending options
  • schema: The output schema of the access operator (may depend on the protocol handler)

Example

CONVERTER({protocol='CSV',
    inputDataHandler='tuple',
    outputDataHandler='tuple',
              options=[
                  ['csv.delimiter',','],
                  ['csv.textDelimiter','"']
              ],
              schema=[['id', 'String'],['text1', 'String'],['text2','String'],['time','String']]            
            }, ACCESS({
              source='Yahoo',
              wrapper='GenericPull',
              transport='HTTP',
              protocol='Document',
              datahandler='Tuple',
              options=[
                ['uri', 'http://finance.yahoo.com/d/quotes.csv?s=AAPL+MSFT&f=snat1'],
                ['method', 'get'],
                ['scheduler.delay','1000'],
				['oneDocumentPerCall','true']
			  ],
              schema=[['text', 'String']]                                    
            }                              
          ))   
  • No labels