This project demonstrates a simple batch processing task using GoBatch. It reads user data from a CSV file, processes it, and outputs the results to a MySQL database.
- Go installed on your system
- MySQL database setup
-
Create Database: Set up a new database in your MySQL server, for example,
gobatch
.- Note: After creating the database, modify the database connection details in
main.go
to match your MySQL configuration. Update the username, password, host, and database name (if different fromgobatch
).
- Note: After creating the database, modify the database connection details in
-
Initialize GoBatch Runtime Tables: Use the SQL script from schema_mysql.sql to create the runtime dependency tables required by GoBatch.
-
Create Users Table: Use the provided
users.sql
to create the necessaryusers
table in your MySQL database. -
CSV Data: Ensure
users.csv
is in the project directory.
Use the provided run.sh
script to build and run the project.
./run.sh