DATABASE

Defines a database-backed data contribution using a SQL query.

Properties of DATABASE

NameTypeDescription
ConnectionStringSTRINGThe full connection string used to connect to the database.
ConnectionNameSTRINGA named connection reference resolved by the runtime or host environment.
SQLSTRINGThe SQL query used to retrieve data from the database.
DbTypeenumDbTypeThe database engine or SQL dialect used when executing the query.
TitleSTRINGThe unique name or title of the item.
EnabledBOOLEANControls whether the dataset participates in evaluation. Enabled by default;
WeightDECIMALOptional weight used to influence priority or contribution during evaluation.
PriorityDECIMALDefines the relative priority of the during evaluation. Higher priority may be evaluated earlier or override lower priority rules.
ActionFieldNameSTRINGSpecifies the column that defines the decision outcome for each data row. This field is required and must exist for inference to occur. Default 'Action'
TitleFieldNameSTRINGSpecifies 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'
PriorityFieldNameSTRINGSpecifies the column that defines row-level priority. If not provided, a neutral priority is assumed. Default 'Priority'
WeightFieldNameSTRINGSpecifies the column that defines row-level weight used to scale influence. If not provided, a neutral weight is assumed. Default 'Weight'
EnabledFieldNameSTRINGSpecifies 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
            '