Installing Custom API
Custom APIs may be used to add new functions to the databases, or define new aggregation functions.
Custom APIs are housed within a folder referred to as a package
.
The kdb Insights Package CLI may be used to initialize a new package.
When deploying kdb Insights Enterprise, set KXI_PACKAGES
for aggregator.env
to a comma-separated list of packages you want to load.
When deploying an assembly set KXI_PACKAGES
to a comma-separated list of packages you want to load on the databases env
.
For example, with two packages named fin
and ml
both versioned as 1.0.0
, you may set the following environment:
This will load the aggregator
entrypoint for the ml and fin packages. Put these values into the insights values.yaml you install with.
service-gateway:
aggregator:
env:
KXI_PACKAGES: "ml:1.0.0,fin:1.0.0"
qe-gateway:
aggregator:
env:
KXI_PACKAGES: "ml:1.0.0,fin:1.0.0"
This will load the data-access
entrypoint for the ml and fin packages. Put these values into an assembly yaml.
dap:
instances:
rdb:
env:
- name: KXI_PACKAGES
value: "ml:1.0.0,fin:1.0.0"
idb:
env:
- name: KXI_PACKAGES
value: "ml:1.0.0,fin:1.0.0"
hdb:
env:
- name: KXI_PACKAGES
value: "ml:1.0.0,fin:1.0.0"