The Senzing engine is configured with a JSON document, this is provided as a template configuration file within the Senzing installation.
With a new installation and project creation, this configuration needs to be added to the database using the G2SetupConfig.py utility. This only needs to be completed once per Senzing project.
Upon execution G2SetupConfig inspects the repository to determine whether a config is already present If a config already exists, you are prompted to overwrite it, or abort the process.
G2SetupConfig uses the G2Module.ini parameter file to determine if you are currently configured to run with a file based config, this could be the case if you are migrating from earlier Senzing versions that did not use the repository to store the config file. It checks for the following parameter:
If this parameter exists, G2SetupConfig will obtain the config from that file and import it as the current configuration. If this parameter is not found, it will import the template config included with the new standard install.
Note: If you have a g2config.json file that is accessed in another way, ensure the G2ConfigFile parameter is set in your INI file before running G2SetupConfig, to import the correct config.
Viewing the Config in the Repository
To verify the configuration is correct after running G2SetupConfig, you can consult the database tables SYS_CFG and SYS_VARS.
The SYS_CFG table contains the JSON configuration that was imported and is contained in the SYS_CFG.CONFIG_DATA column. The SYS_CFG.CONFIG_DATA_ID contains an identifier that uniquely points to that data. This table may contain many different registered configurations, which can be referenced by their unique identifiers.
The SYS_VARS table contains different system configuration variables, one of which is the configuration to use. The row with VAR_GROUP=CONFIG and VAR_CODE=DEFAULTCONFIGID contains the identifier for the config data to use, in the VAR_VALUE column.
Note: A properly configured system will have entries in both the SYS_CFG and SYS_VARS table. If either of these rows are missing the system is either has not been initially set up yet or is misconfigured.