# Nomet-loader

Loads automatically created machine log data to Postgres database.

## Usage

The entry point to the project is at `update_data.lua`. It connects to 4D and syncs the data to a Postgres database. Before running it initially, make sure you create the tables required by invoking `init_db.lua`. It drops possible existing tables and recreates them.

## Development

The important parts have been tested separately. Execute `tests/...` to test a specific module. To make it more convenient, run it through some file watcher (example: `find . -name '*.lua' | entr tests/parse_path.lua`).

`update_data.lua` is the main script itself. For it to run you need to make sure 4D is running and Postgres has been configured. Currently it's not possible to pass a separate test configuration for either and it relies on some internal values (not adding to this doc given it's sensitive info).
