Skip to content

Datastore

Datastore is a logical grouping of enums, embeddables and entities. Datastore is tied to a database type like Postgres, Clickhouse or Apache Age. A product can have one more datastores, and when a product is deployed into an environment, it is attached to all its datastores. Data API block, creates REST and GraphQL APIs on the fly based on the entities in the Datastore.

Example Datastore

/data/datastores/datastores.yaml
1
injectdatastore: alm
2
defaultdatastore: alm
3
datastores:
4
- name: alm
5
path: alm
6
prefix: alm_ # prefix to table name
7
database:
8
name: postgres
9
min-version: 15
10
inject: true
11
injectservices:
12
- iam
13
- name: alm-analytics
14
path: alm-analytics
15
database:
16
name: clickhouse
17
min-version: 22
18
inject: true

The prefix attribute is used to prefix all table names or collection names to be prefixed with the value. For example an entity with name task would have table with name alm_task.

Default Datastore

Data API can serve multiple datastores with the url pattern /data/rest/:entity, /data/graphql etc. By default entities from the default datastore are served. To serve entities from other datastores use the query param datastore and so the urls will be /data/rest/:entity?datastore='alm-analytics', /data/graphql?datastore='alm-analytics'

Supported Databases

kis.ai Data API out of the box supports few databases out of the box, and due to its extensible architecture, support for new databases can be added quickly as needed.

DatabaseSlugDescriptionVersions
PostgrespostgresPostgres database for relational workloads. Supports GIS and Vector extensions.14,15 and 16
ClickhouseclickhouseClickhouse database for Analytical workloads23 and 24
DuckDBduckdbDuckDB in-memory OLAP database1.0.0
Apache AgeageApache Age graph database1.5.0