Most database Connections use polling to regularly fetch data on a user specified timer. Alternatively you can create a subscription. This means the data source will push updates rather than polling. It can be more efficient for frequently updating data.

Currently to create a subscription you should:

  1. Create a "Kdb Streaming" connection type.
  2. Specify that connection as a source and set the query. e.g. .u.sub[`tblname;::]

Behind the scenes, for every unique subscription including query the server will:

  1. Open a connection to the streaming data source.
  2. Send the subscription query.
  3. Await incoming data and forward results to the dashboard. For kdb the result format is expected to be (`.u.upd;`tableName;tableData).
  4. Keep the connection open until the dashboard is closed.

Basic example kdb code to create a subscription:

Kdb+ Subscription Tutorial

Subscription Options

As shown in the image below, subscription provides additional configuration:

  • The dropdown shown in the image allows setting the number of rows to be stored on the UI, any new rows received will be added to the displayed table up until this limit is reached.
    If None is set the latest update table received replaces all previous content.
  • When in append mode, you can configure whether new records are added to the top or bottom of the table. This is useful for charting vs table display.
  • subscription configuration

    b