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 |
||||
type |
object |
||||
properties |
|||||
|
To Table |
||||
type |
string |
||||
|
From Attribute |
||||
type |
string |
||||
|
To Attribute |
||||
type |
string |
||||
|
Show Attribute |
||||
type |
string |
||||
|
TableSchema |
||||
type |
object |
||||
properties |
|||||
|
Column List |
||||
type |
array |
||||
items |
type |
string |
|||
|
Primary Key List |
||||
type |
array |
||||
items |
type |
string |
|||
|
Column Alias List |
||||
anyOf |
type |
object |
|||
additionalProperties |
type |
string |
|||
type |
null |
||||
|
References |
||||
type |
array |
||||
items |
#/$defs/Reference |
||||
Concepts List
type |
array |
|||
items |
#/$defs/Concept |
|||
$defs |
||||
|
Attribute |
|||
type |
object |
|||
properties |
||||
|
Keyword |
|||
type |
string |
|||
|
Order By |
|||
type |
boolean |
|||
default |
False |
|||
|
Type |
|||
const |
word |
|||
|
Columns |
|||
type |
array |
|||
items |
type |
string |
||
|
By |
|||
default |
null |
|||
anyOf |
type |
array |
||
items |
#/$defs/Reference |
|||
type |
null |
|||
|
Category |
|||
type |
object |
|||
properties |
||||
|
Column |
|||
type |
string |
|||
|
Alias |
|||
type |
string |
|||
|
Keyword |
|||
type |
string |
|||
|
ColumnDescriptor |
|||
type |
object |
|||
properties |
||||
|
Keyword |
|||
type |
string |
|||
|
Columns |
|||
type |
array |
|||
items |
type |
string |
||
|
Concept |
|||
type |
object |
|||
properties |
||||
|
Element Name |
|||
type |
string |
|||
|
Aliases |
|||
type |
array |
|||
default |
||||
items |
type |
string |
||
|
Type |
|||
type |
string |
|||
enum |
primary, secondary, crossable |
|||
|
Table Name |
|||
type |
string |
|||
|
Show Columns |
|||
type |
array |
|||
default |
||||
items |
#/$defs/ColumnDescriptor |
|||
|
Category |
|||
type |
array |
|||
default |
||||
items |
#/$defs/Category |
|||
|
Attributes |
|||
type |
array |
|||
default |
||||
items |
#/$defs/Attribute |
|||
|
Relations |
|||
type |
array |
|||
default |
||||
items |
#/$defs/Relation |
|||
|
Reference |
|||
type |
object |
|||
properties |
||||
|
From Table Name |
|||
type |
string |
|||
|
From Columns |
|||
type |
array |
|||
items |
type |
string |
||
|
To Table Name |
|||
type |
string |
|||
|
To Columns |
|||
type |
array |
|||
items |
type |
string |
||
|
Relation |
|||
type |
object |
|||
properties |
||||
|
Keyword |
|||
type |
string |
|||
|
Element Name |
|||
type |
string |
|||
|
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”.
type |
object |
||
additionalProperties |
#/$defs/TableView |
||
$defs |
|||
|
ColumnView |
||
type |
object |
||
properties |
|||
|
Attribute |
||
type |
string |
||
|
Display |
||
type |
string |
||
|
TableView |
||
type |
object |
||
properties |
|||
|
Column List |
||
type |
array |
||
items |
#/$defs/ColumnView |
||