JsonDatabaseFiller is a Node.js application designed to import large JSON data into a SQLite database. It reads a newline delimited JSON (NDJSON) file, processes it line by line, and inserts the data into a SQLite database.
These instructions will get you a copy of the project up and running on your local machine.
- Node.js (Download and install from here)
- SQLite3
- Clone the repository or download the zip file and extract it.
git clone git@github.com:thomas-beylemans/JsonDatabaseFiller.git
Install dependencies.
cd JsonDatabaseFiller
npm install
- Ensure your NDJSON file is placed in the data directory and named myjson.json (or adapt the code).
- Update the createTableQuery variable in importData.js with your database structure if necessary.
- Run the application.
npm start
You will see a message indicating the import process has started. Once completed, a message will display indicating the import process has finished and the database connection has been closed.