DDL and load db scripts for History Lab topics models.
Run the sql script ddl/topic-model.sql
to install the topic model tables in an
existing schema.
To load topic models in History Lab csv format, run the following scripts in this order:
load/create-stage-tables.sql
load/load-stage-tables-pg.sh
(PostgreSQL only)load/populate-tables.sql
load/drop-stage-tables.sql
Rename doc_id column in the topic_docs table if necessary and add referential integrity constraint.
- keep
ddl/topic-model.sql
to create topic-model tables for new corpus schemas - create a backup-topic-model script
- update
load-stage-tables-pg.sh
for direct load including drop constraints, truncate and recreate indices - remove
*tables.sql