Skip to content

Queries Unichem's DB and Indexes the structure data into an Elasticsearch Index

License

Notifications You must be signed in to change notification settings

chembl/unichem2index

Repository files navigation

Unichem2index

Small tool for information replication between Unichem's DB and an ElasticSearch index.

How to use

After installing oracle's oracle-instaclient on your machine run:

unichem2index -eshost="http://0.0.0.0:9200" -oraconn=hr/hr@localhost:1521:XE

Configuration File

# Oracle Connection String for Unichems DB
oracleconn: 'hr/hr@oradb:1521/xe'

# ElasticSearch host, index and type
elastichost: 'http://elasticsearch:9200'
index: Unichem
type: Compound

# Query parameters for extraction
querystart: 2 # Starting number, useful to resume stoped extractions
querylimit: 5 # Amount of records fetch on each query
# Elastic Bulk add parameters
bulklimit: 2 # Limit of records to add for each Bulk worker
maxbulkcalls: 4 # Maximum number of worker at one time

logpath: ''

Flags

  • eshost (Mandatory): ElasticSearch host, e.g.: -eshost="http://0.0.0.0:9200". This will override the ES host on the config file.
  • oraconn (Mandatory): Oracle DB connection string, e.g.: -oraconn=hr/hr@localhost:1521:XE. This will override the Oracle Connection Strin on the config file (oraclenconn).
  • v: Software version
  • d: Debug log level

NOTE: Setting the log level to Debug will greatly decrease performance

How to build

A Go installation its required in order to compile Unichem2index, it can be downloaded from here.

make build
  1. Build the binary using docker-compose up golangBuilder
  2. Build the docker image using docker-compose build unichem
  3. docker push chembl/unichem2index:latest

Dockerized

To run it on Docker its required to download oracle's instant client files and place them on the Docker folder, e.g.:

Docker/oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm
Docker/oracle-instantclient18.3-devel-18.3.0.0.0-1.x86_64.rpm
Docker/oracle-instantclient18.3-sqlplus-18.3.0.0.0-1.x86_64.rpm

Make sure to place your config.yaml file inside the Docker folder as well. config.yaml example

About

Queries Unichem's DB and Indexes the structure data into an Elasticsearch Index

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages