Skip to content

ur_ingest_session

Description

Immutable ingestion sessions represents any “discovery” or “walk” operation. This could be a device file system scan or any other resource discovery session. Each time a discovery operation starts, a record is created. ur_ingest_session has a foreign key reference to the device table so that the same device can be used for multiple ingest sessions but also the ingest sessions can be merged across workstations / servers for easier detection of changes and similaries between file systems on different devices.

Table Definition
CREATE TABLE "ur_ingest_session" (
"ur_ingest_session_id" VARCHAR PRIMARY KEY NOT NULL,
"device_id" VARCHAR NOT NULL,
"behavior_id" VARCHAR,
"behavior_json" TEXT CHECK(json_valid(behavior_json) OR behavior_json IS NULL),
"ingest_started_at" TIMESTAMP NOT NULL,
"ingest_finished_at" TIMESTAMP,
"elaboration" TEXT CHECK(json_valid(elaboration) OR elaboration 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("behavior_id") REFERENCES "behavior"("behavior_id"),
UNIQUE("device_id", "created_at")
)

Columns

NameTypeDefaultNullableChildrenParentsComment
ur_ingest_session_idVARCHARfalseur_ingest_session_fs_path uniform_resource ur_ingest_session_fs_path_entry ur_ingest_session_task{“isSqlDomainZodDescrMeta”:true ,“isVarChar”:true }
device_idVARCHARfalsedevice{“isSqlDomainZodDescrMeta”:true ,“isVarChar”:true }
behavior_idVARCHARtruebehavior{“isSqlDomainZodDescrMeta”:true ,“isVarChar”:true }
behavior_jsonTEXTtrue{“isSqlDomainZodDescrMeta”:true ,“isJsonText”:true }
ingest_started_atTIMESTAMPfalse{“isSqlDomainZodDescrMeta”:true ,“isDateSqlDomain”:true ,“isDateTime”:true }
ingest_finished_atTIMESTAMPtrue{“isSqlDomainZodDescrMeta”:true ,“isDateSqlDomain”:true ,“isDateTime”:true }
elaborationTEXTtrue{“isSqlDomainZodDescrMeta”:true ,“isJsonText”:true }
created_atTIMESTAMPCURRENT_TIMESTAMPtrue
created_byTEXT’UNKNOWN’true
updated_atTIMESTAMPtrue
updated_byTEXTtrue
deleted_atTIMESTAMPtrue
deleted_byTEXTtrue
activity_logTEXTtrue{“isSqlDomainZodDescrMeta”:true ,“isJsonSqlDomain”:true }

Constraints

NameTypeDefinition
ur_ingest_session_idPRIMARY KEYPRIMARY KEY (ur_ingest_session_id)
- (Foreign key ID: 0)FOREIGN KEYFOREIGN KEY (behavior_id) REFERENCES behavior (behavior_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_ur_ingest_session_2UNIQUEUNIQUE (device_id, created_at)
sqlite_autoindex_ur_ingest_session_1PRIMARY KEYPRIMARY KEY (ur_ingest_session_id)
-CHECKCHECK(json_valid(behavior_json) OR behavior_json IS NULL)
-CHECKCHECK(json_valid(elaboration) OR elaboration IS NULL)

Indexes

NameDefinition
sqlite_autoindex_ur_ingest_session_2UNIQUE (device_id, created_at)
sqlite_autoindex_ur_ingest_session_1PRIMARY KEY (ur_ingest_session_id)

Relations

er