DATABASE
Defines a database-backed data contribution using a SQL query.
Properties of DATABASE
| Name | Type | Description |
| ConnectionString | STRING | The full connection string used to connect to the database. |
| ConnectionName | STRING | A named connection reference resolved by the runtime or host environment. |
| SQL | STRING | The SQL query used to retrieve data from the database. |
| DbType | enumDbType | The database engine or SQL dialect used when executing the query. |
| Title | STRING | The unique name or title of the item. |
| Enabled | BOOLEAN | Controls whether the dataset participates in evaluation. Enabled by default; |
| Weight | DECIMAL | Optional weight used to influence priority or contribution during evaluation. |
| Priority | DECIMAL | Defines the relative priority of the during evaluation. Higher priority may be evaluated earlier or override lower priority rules. |
| ActionFieldName | STRING | Specifies the column that defines the decision outcome for each data row. This field is required and must exist for inference to occur. Default 'Action' |
| TitleFieldName | STRING | Specifies the column that provides a human-readable title or label for each data row. This field is optional and is used for identification, display, or reporting purposes only. It does not participate in inference or decision-making. Default 'Title' |
| PriorityFieldName | STRING | Specifies the column that defines row-level priority. If not provided, a neutral priority is assumed. Default 'Priority' |
| WeightFieldName | STRING | Specifies the column that defines row-level weight used to scale influence. If not provided, a neutral weight is assumed. Default 'Weight' |
| EnabledFieldName | STRING | Specifies the column that determines whether a data row is admitted into inference. If the value evaluates to false, the row is excluded entirely and no DecisionRow is created. If not provided, rows are assumed to be enabled. Default 'Enabled' |
Syntax
DATA FROM DATABASE
Examples
MODULE
MODEL
DATA FROM DATABASE
DbType = MSSQL
ConnectionName = 'CustomerDB'
SQL = '
SELECT
SentimentScore,
IssueSeverityScore,
WaitTime,
CustomerAge,
RuleAction
FROM CustomerInteractions
'