Skip to content

Using the sample program for the kdb Insights Python interface

This page describes how to use our sample Python program, available on the KX Downloads Portal.

This sample:

  • Publishes data from the sample.csv file to either:

    • kdb Insights Reliable Transport

    • A kxi-db package inside the kdb Insights Enterprise. You can download this package using the instructions here.

Downloading

The insights-python-sdk-samples.${VERSION}.zip, which you download from the KX Download Portal.

  • csvupload.py
  • sample.csv

Before using the sample program you must install the Python interface

Running the sample

To upload the sample.csv file, use the following command:

python3 csvupload.py --config <config URL> --dir <RT directory>

The --config argument can be either:

  • a kdb Insights Enterprise client URL or
  • a URL to a local JSON file (file://...) containing the RT configuration.

See the Getting Started section for further information.

The --dir argument is the path to RT log directory.

The program uploads the sample.csv file and then exit.