Introduction
Out of the box, Senzing is configured to use an embedded SQLite database for the entity repository to accelerate getting started. This article describes the steps to configure Senzing to use PostgreSQL as the entity repository.
Link
For additional PostgreSQL information:
Pre-requisites
- A user, password, IP, and database from your DBA that you use with select, delete, update, and truncate access.
- Note: For the installation, either the DBA installs the Senzing schema or you need to have DDL writes too.
- A PostgreSQL server setup considering this article
- Advanced PostgreSQL tuning information is here
- libpq and psql installed
- Ubuntu/Debian: typically libpq5 and postgresql-client-common/postgresql-client-<version> packages
- AWS Linux 2/RedHat: typically postgresql<version>-libs and postgresql<version> packages
Add Senzing Schema
If your DBA has not installed the schema already, you will need to do so.
psql -U <user> -d <database> -h <server> -W
\i <senzing_project_path>/resources/schema/g2core-schema-postgresql-create.sql
- <senzing_project_path> = Your Senzing project path from the G2CreateProject.py command
\dt
\q
Configure the CONNECTION
Depending on you set your G2Module configuration...
- Change the SQL CONNECTION entry
- CONNECTION=postgresql://<user>:<password>@<server>:5432:<database>/
- Or optionally with a non-default schema
- CONNECTION=postgresql://<user>:<password>@<server>:5432:<database>/?schema=<schema>
Install the default Senzing configuration
- Source setupEnv
cd <senzing_project_path>
source setupEnv
- Inject the default configuration
python3 python/G2SetupConfig.py
Comments
0 comments
Please sign in to leave a comment.