Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.28 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.28 KB

Script to Send Predefined Queries to ArangoDB

Prerequisites

  1. Linux/Mac
  2. Install Python (Anaconda/Miniconda, Enthought, or System)
  3. Install PyArango (pip install pyarango)

Usage

  1. Install dependencies
  2. Edit your query as appropriate (query.aql)
  3. Open query.py, find the connect_to_database() function, make sure you're connecting to the correct database and port.
  4. Make sure you have a list of keywords IDs you want to query for. For example, you could have file keywords.json looking like:
[
  { "key": "3317658057" },
  { "key": "12219921" } 
]
  1. Call the script python ./query.py --keyfile keywords.json
  2. If you know your queries take a while (or you run a lot of queries), edit query.sh as appropriate, call it in a screen session, and go home for the night.
  3. For each keyword ID (for example, 123) you query, the script will write a file result_123.json.

References/Links