Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OpenSpecimen's Query module supports automated export of data into a CSV file. This CSV file can then be picked by an external program and processed.

Steps:

  1. Via UIGUI, create a query with the required filters (e.g. filter by CP) and defined view containing add the columns needed by the external system
  2. Save the query
  3. Schedule the query to run at regular required intervals (E.g. nightly, hourly etc)
  4. In every query run, the data satisfying the query filters are exported to a CSV file. The exported CSV file is stored in the directory $OS_DATA_DIR/query-exported-data using the following name format - scheduled_query_<query_id>_<job_run_id>.csv
  5. Write an external program to monitor the query export directory and process the required CSV files (using the filename scheduled_query_<query_id>_*.csv).

...