Using the sample program for the kdb Insights Python interface
KX Nexus
The KX Nexus repository will be sunsetted in the future. Nexus links on this page are provided as a temporary alternative to the KX Downloads Portal for existing users. The KX Downloads Portal is the preferred repository for all use cases and KX Nexus links will be removed once the KX Nexus repository is decommissioned.
This section describes how to use our sample Python program, available on Nexus, to:
-
Publish data from the
sample.csv
file to either: -
kdb Insights Reliable Transport
- A
sdk_sample_assembly
assembly inside kdb Insights Enterprise. You can download this assembly using the instructions in Downloading assemblies.
Downloading
The insights-python-sdk-samples.${VERSION}.zip
, which you can download from either the KX Downloads Portal or KX Nexus repository, contains the following files:
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.
Refer to the Getting Started section for further information.
The --dir
argument is the path to RT log directory.
The program will upload the sample.csv
file and then exit.