Altair® Panopticon

 

Creating Kx kdb+tick Input Data Source

The Kx kdb+tick input data source allows connection to a Kx kdb+ ticker plant on a real-time streaming basis.

Specifically, it allows Panopticon Streams to subscribe to Kx kdb+tick through the definition of Service, Table, Symbol, or directly through Functional Subscription.

Steps:

1.     In the New Data Source page, select Input > KDB+ Tick in the Connector drop-down list.


 

2.     Enter the following properties:

Property

Description

Host

Kx kdb+tick host address.

Port

Kx kdb+tick host port. Default is 5010.

TLS Enabled

Ensure to check if you have started q with TLS only.

User Id

The user Id that will be used to connect to Kx kdb+tick.

Password

The password that will be used to connect to Kx kdb+tick.

Timeout

The length of time to wait for the server response in seconds. Default is 10.

 

   NOTE

These properties can be parameterized.

 

3.     Select either Subscription Type:

·         Service

Enter the following properties:

¨        Subscription Name (e.g., .u.sub)

 

   NOTE

Instead of entering the table and symbol to subscribe against in the Table and Symbol text boxes, you can specify the full subscription syntax in the Subscription Name text box. For example:

.u.sub[`table;`symbol]

To subscribe to the trade table and AAPL, AIG, and DOW symbols, enter this in the Subscription Name text box:

.u.sub[`trade;`AAPL`AIG`DOW]

 

¨        Table to subscribe against (e.g., trade)

 

   NOTE

·           You may use just a back tick for the table name, intending to subscribe to all available tables.

·           When a table name is not entered in the Table text box, then the Symbol text box is disabled meaning it will not be used while doing subscription.

 

¨        Symbol to subscribe against (e.g., AAPL)

 

   NOTE

Multiple symbols should be separated by a comma.

 

·         Functional Subscription

Enter the functional subscription that needs to be issued (e.g., .u.sub[`trade;`])

4.     Click  to retrieve the schema of the configured subscription.

This populates the Id Column with the set of columns from the schema of type sym and the text array such as Character/Boolean/GUID, etc.

5.     Check Constrain subscription to matching symbols to select the column which contains specific symbols. Otherwise, the filtering against these symbols will not take place.

 

   NOTE

The Constrain subscription to matching symbols only lists sym fields. Therefore, if you select a non sym type in the Id Column, it is not recommended to select the default value [Id Column] in the Constrain subscription to matching symbols drop-down list.

 

6.     Activate or deactivate Initialize with historic data. If unchecked, the data source will only be populated with streaming updates that are subscribed against. If checked, the data source is first initialized against a store of data, after which subscribed streaming updates are then applied.

7.     Enter the following information:

·         Host

·         Port

·         User Id

·         Password

·         Timeout

·         Query

These entries can be parameterized.

8.     Select the  Deferred Sync Query check box to allow the Kxkdb+tick data source to support synchronous and asynchronous reads. The advantage of using this option is that there is no queue on the Kx kdb+tick server side, queries are farmed out to slaves and returned to asynchronous instead.

The {Query} parameter is used as a place holder for the target query that is defined in the Query builder.

9.     Select the Flatten List Limit.

This allows retrieval of the first ‘n’ items in the list and produce new columns in the output schema with a dot notation.

For example, if there are two nested fields (BidPrices and OfferPrices) and the flatten list limit selected is five, then the output schema will be:

BidPrices.1, BidPrices.2, BidPrices.3, BidPrices.4, BidPrices.5, OfferPrices.1, OfferPrices.2, OfferPrices.3, OfferPrices.4, OfferPrices.5

If there are less than five items in the list, then the values will be null.

 

   NOTE

Currently, this feature works for the Service subscription type. Also, it only flattens numeric columns.

 

10.   Define the Real-time Settings.

11.   Click . The new data source is added in the Data Sources list.