Skip to content

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
CREATE TABLE "behavior" (
"behavior_id" VARCHAR PRIMARY KEY NOT NULL,
"device_id" VARCHAR NOT NULL,
"behavior_name" TEXT NOT NULL,
"behavior_conf_json" TEXT CHECK(json_valid(behavior_conf_json)) NOT NULL,
"assurance_schema_id" VARCHAR,
"governance" TEXT CHECK(json_valid(governance) OR governance IS NULL),
"created_at" TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
"created_by" TEXT DEFAULT 'UNKNOWN',
"updated_at" TIMESTAMP,
"updated_by" TEXT,
"deleted_at" TIMESTAMP,
"deleted_by" TEXT,
"activity_log" TEXT,
FOREIGN KEY("device_id") REFERENCES "device"("device_id"),
FOREIGN KEY("assurance_schema_id") REFERENCES "assurance_schema"("assurance_schema_id"),
UNIQUE("device_id", "behavior_name")
)

Columns

NameTypeDefaultNullableChildrenParentsComment
behavior_idVARCHARfalseur_ingest_session{“isSqlDomainZodDescrMeta”:true ,“isVarChar”:true }
device_idVARCHARfalsedevice{“isSqlDomainZodDescrMeta”:true ,“isVarChar”:true }
behavior_nameTEXTfalseArbitrary but unique per-device behavior name (e.g. ingest::xyz)
behavior_conf_jsonTEXTfalseConfiguration, settings, parameters, etc. describing the behavior (JSON, behavior-dependent)
assurance_schema_idVARCHARtrue{“isSqlDomainZodDescrMeta”:true ,“isVarChar”:true }
governanceTEXTtrueDescriptions or other “governance” details (JSON, behavior-dependent)
created_atTIMESTAMPCURRENT_TIMESTAMPtrue
created_byTEXT’UNKNOWN’true
updated_atTIMESTAMPtrue
updated_byTEXTtrue
deleted_atTIMESTAMPtrue
deleted_byTEXTtrue
activity_logTEXTtrue{“isSqlDomainZodDescrMeta”:true ,“isJsonSqlDomain”:true }

Constraints

NameTypeDefinition
behavior_idPRIMARY KEYPRIMARY KEY (behavior_id)
- (Foreign key ID: 0)FOREIGN KEYFOREIGN 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 KEYFOREIGN KEY (device_id) REFERENCES device (device_id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE
sqlite_autoindex_behavior_2UNIQUEUNIQUE (device_id, behavior_name)
sqlite_autoindex_behavior_1PRIMARY KEYPRIMARY KEY (behavior_id)
-CHECKCHECK(json_valid(behavior_conf_json))
-CHECKCHECK(json_valid(governance) OR governance IS NULL)

Indexes

NameDefinition
sqlite_autoindex_behavior_2UNIQUE (device_id, behavior_name)
sqlite_autoindex_behavior_1PRIMARY KEY (behavior_id)

Relations

er