Data Handler
Introduction
Data Handler is an open-sourced and extensible NodeJS server application that facilitates ETL processes for the data needs of SpatialWork. The source code for a template Data Handler is provided to all users to allow customization for any data requirements. You can find the template repository on Github. It allow you to fetch and save data to a MongoDB database and serve it via API.
Requirements
Node.js
MongoDB Database
Setup
Fork this repository to your own GitHub account.
Clone the forked repository to your local machine.
Install the required nodejs dependencies.
Usage
Add a new job
Define your job name, e.g. my_new_job
Create a folder in
jobs/
and create a newmy_new_job.js
file inside.Define your job logic. See any of the job samples for reference.
Add a new job definition in
jobs/jobs.js
, in thejobs
array:Create the same folder in
model/
and create a newmodel-my_new_job.js
file inside.Define your MongoDB collection schema. See any of the model samples for reference.
Add a new model definition in
models/models.js
. If your collection stores data in rows, add it torowDataModels
. If your collection stores data in snapshots, add it tosnapshotDataModels
.
Additional Resources
Support
For any issues or support requests, please create an issue on the repository.
Last updated