Register Ingester OC is a data ingester for the OpenOwnership Register project. It processes bulk data published by OpenCorporates, and ingests records into Elasticsearch. It uses raw records only, and doesn't do any conversion into the Beneficial Ownership Data Standard (BODS) format.
Install and boot Register.
Configure your environment using the example file:
cp .env.example .envCreate the Elasticsearch indexes:
docker compose run ingester-oc create-indexesCreate the AWS Athena tables:
docker compose run ingester-oc create-tables add_ids
docker compose run ingester-oc create-tables alt_names
docker compose run ingester-oc create-tables companiesRun the tests:
docker compose run ingester-oc testFind the directory relating to the data to download, e.g. 2023-10-01. This is then used in subsequent commands.
Decide on which bulk data file source to be ingested, e.g. companies. The options are:
add_idsalt_namescompanies
There are now two options:
- ingest by using the helper script
- ingest by running the commands step-by-step
To ingest the bulk data (published monthly):
docker compose run ingester-oc ingest-bulk 2023-10-01Download the bulk data file from OpenCorporates via SFTP (enter the password when prompted):
docker compose run ingester-oc download-from-oc companies /oc-sftp-prod/open_ownership/2023-10-01 storage/oc_file_companiesSplit and upload file in Gzipped parts to AWS S3:
docker compose run ingester-oc upload-split-bulk-data companies 2023_10 storage/oc_file_companiesConvert OpenCorporates bulk data using AWS Athena:
docker compose run ingester-oc convert-oc-data companies 2023_10Export OpenCorporates bulk data for ingestion into Elasticsearch:
docker compose run ingester-oc export-oc-data companies 2023_10Ingest AWS S3 exported files into Elasticsearch:
docker compose run ingester-oc ingest-into-es companies 2023_10