esp_kdbin

Reads data from a KDB database table into an Event Stream Processor stream.

The esp_kdbin adapter reads data from a KDB database into a stream in the Event Stream Processor. You can configure the adapter to read either queried or streaming data, based on a configuration parameter.

By default, the adapter matches the field names (in a case-insensitive manner) to decide the mapping between the source KDB table and the target stream. You also have the option of explicitly specifying the mapping.

Syntax

esp_kdbin -H [kdbhost:]kdbport -p [host:]port -q source -s stream -c user[:password] [OPTION...]

Required Arguments

Options

Examples

Execute a basic streaming mode query that reads data from a KdbTrades table in a KDB database on the server myServer, where KDB is listening on port 9200, and writes it to the SpTrades stream in the Event Stream Processor on the local server where the Command and Control interface is on port 1190, use:
esp_kdbin -p 1190 -H myServer:9200 -q KdbTrades -s SpTrades
    
To execute the same query, explicitly mapping fields in the KDB database to columns in the Event Stream Processor stream, use:
esp_kdbin -p 1190 -H myServer:9200 -q KdbTrades -s SpTrades \
-M SpId=KId:SpSymbol=KSymbol:SpPrice=KPrice:SpCount=KCount
    
To execute a pull mode operation that issues the specified query every 5 seconds to a KDB database on the server myServer, where KDB is listening on port 9200, and writes data to the Event Stream Processor, on the server outputServer, where the Command and Control interface is on port 1221, use:
esp_kdbin -p outputServer:1221 -H myServer:9200 -q 'select Id, Symbol, Price, Count from KdbTrades' \
-s SpTrades -m -I 5