Database Configuration Files

The CHATIDEA framework currently uses three different configuration files to connect to a database. Note that the task of collapsing the three configuration files into a single simpler file is in the backlog of the project: please refer to the right version of the framework to get an accurate documentation of the state of the configuration schema.

The three files are responsible for: defining the database schema and all the relationships among entities; defining the basic concepts with which users will interact; defining how the concepts should be presented and viewed by the users. The path of the three files must be made available through a .env file.

The following are the configuration schemas for each of the three files (respectively). Note that if CHATIDEA recognizes an error in the configuration, it will prevent you from running the framework to avoid non-deterministic behaviors.

Database Schema

type

object

additionalProperties

#/$defs/TableSchema

$defs

  • Reference

Reference

type

object

properties

  • to_table

To Table

type

string

  • from_attribute

From Attribute

type

string

  • to_attribute

To Attribute

type

string

  • show_attribute

Show Attribute

type

string

  • TableSchema

TableSchema

type

object

properties

  • column_list

Column List

type

array

items

type

string

  • primary_key_list

Primary Key List

type

array

items

type

string

  • column_alias_list

Column Alias List

anyOf

type

object

additionalProperties

type

string

type

null

  • references

References

type

array

items

#/$defs/Reference

Concepts List

type

array

items

#/$defs/Concept

$defs

  • Attribute

Attribute

type

object

properties

  • keyword

Keyword

type

string

  • order_by

Order By

type

boolean

default

False

  • type

Type

const

word

  • columns

Columns

type

array

items

type

string

  • by

By

default

null

anyOf

type

array

items

#/$defs/Reference

type

null

  • Category

Category

type

object

properties

  • column

Column

type

string

  • alias

Alias

type

string

  • keyword

Keyword

type

string

  • ColumnDescriptor

ColumnDescriptor

type

object

properties

  • keyword

Keyword

type

string

  • columns

Columns

type

array

items

type

string

  • Concept

Concept

type

object

properties

  • element_name

Element Name

type

string

  • aliases

Aliases

type

array

default

items

type

string

  • type

Type

type

string

enum

primary, secondary, crossable

  • table_name

Table Name

type

string

  • show_columns

Show Columns

type

array

default

items

#/$defs/ColumnDescriptor

  • category

Category

type

array

default

items

#/$defs/Category

  • attributes

Attributes

type

array

default

items

#/$defs/Attribute

  • relations

Relations

type

array

default

items

#/$defs/Relation

  • Reference

Reference

type

object

properties

  • from_table_name

From Table Name

type

string

  • from_columns

From Columns

type

array

items

type

string

  • to_table_name

To Table Name

type

string

  • to_columns

To Columns

type

array

items

type

string

  • Relation

Relation

type

object

properties

  • keyword

Keyword

type

string

  • element_name

Element Name

type

string

  • by

By

type

array

items

#/$defs/Reference

Database View

A configuration object that allows to define how each table is presented to the user. It contains, for each table, a mapping between the name of the columns that should be shown as saved in the database and the name of the columns in “natural language”.

https://chatidea.gihub.io/chatidea/schemas/view.schema.json

type

object

additionalProperties

#/$defs/TableView

$defs

  • ColumnView

ColumnView

type

object

properties

  • attribute

Attribute

type

string

  • display

Display

type

string

  • TableView

TableView

type

object

properties

  • column_list

Column List

type

array

items

#/$defs/ColumnView