behavior
Description
Behaviors are configuration “presets” that can be used to drive
application operations at runtime. For example, ingest behaviors
include configs that indicate which files to ignore, which to
scan, when to load content, etc. This is more convenient than
creating
behavior has a foreign key reference to the device table since
behaviors might be device-specific.
Table Definition
Columns
Name | Type | Default | Nullable | Children | Parents | Comment |
---|---|---|---|---|---|---|
behavior_id | VARCHAR | false | ur_ingest_session | {“isSqlDomainZodDescrMeta”:true,“isVarChar”:true} | ||
device_id | VARCHAR | false | device | {“isSqlDomainZodDescrMeta”:true,“isVarChar”:true} | ||
behavior_name | TEXT | false | Arbitrary but unique per-device behavior name (e.g. ingest::xyz) | |||
behavior_conf_json | TEXT | false | Configuration, settings, parameters, etc. describing the behavior (JSON, behavior-dependent) | |||
assurance_schema_id | VARCHAR | true | {“isSqlDomainZodDescrMeta”:true,“isVarChar”:true} | |||
governance | TEXT | true | Descriptions or other “governance” details (JSON, behavior-dependent) | |||
created_at | TIMESTAMPTZ | CURRENT_TIMESTAMP | true | |||
created_by | TEXT | ’UNKNOWN’ | true | |||
updated_at | TIMESTAMPTZ | true | ||||
updated_by | TEXT | true | ||||
deleted_at | TIMESTAMPTZ | true | ||||
deleted_by | TEXT | true | ||||
activity_log | TEXT | true | {“isSqlDomainZodDescrMeta”:true,“isJsonSqlDomain”:true} |
Constraints
Name | Type | Definition |
---|---|---|
behavior_id | PRIMARY KEY | PRIMARY KEY (behavior_id) |
- (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (assurance_schema_id) REFERENCES assurance_schema (assurance_schema_id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE |
- (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (device_id) REFERENCES device (device_id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE |
sqlite_autoindex_behavior_2 | UNIQUE | UNIQUE (device_id, behavior_name) |
sqlite_autoindex_behavior_1 | PRIMARY KEY | PRIMARY KEY (behavior_id) |
- | CHECK | CHECK(json_valid(behavior_conf_json)) |
- | CHECK | CHECK(json_valid(governance) OR governance IS NULL) |
Indexes
Name | Definition |
---|---|
sqlite_autoindex_behavior_2 | UNIQUE (device_id, behavior_name) |
sqlite_autoindex_behavior_1 | PRIMARY KEY (behavior_id) |