This is a utility that adds work items in batch to RabbitMQ for the use of products downstream from Senzing.
senzing -- Senzing's environment must be sourced. If senzing is installed into /home/user, the environment can be sourced as follows
. /home/user/senzing/setupEnv
This utility will automatically use the senzing configuration associated with your installation.
If you don't already have Senzing installed, instructions can be found here Senzing quickstart guide
pika -- RabbitMQ Client must be installed
sudo pip install pika
pip install pika
sample configuration file can be found in config.json.SAMPLE
config.json is the default filename. alternative config file name can be specified with the -c flag.
Config file contains RabbitMQ and Senzing connection info and is very intuitive. RabbitMQ queue name can be anything the user chooses, and will be automatically created if queue of that name doesn't already exist.
Usage is built in to the utility
python3 populate.py -h
python3 populate.py all
Input file must be of CSV format with a header. Must contain DATA_SOURCE and RECORD_ID columns. The following will load all the entities from the file input.csv
python3 populate.py list
Input filename can be specified
python3 populate.py list -i somefile.csv