Skip to content

Welcome to the Spring Boot Batch CSV to MySQL Converter – a streamlined solution for processing large datasets, converting CSV files to MySQL databases, and optimizing data workflows effortlessly.

Notifications You must be signed in to change notification settings

swapniltake1/csvtomysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Batch processing code that converts CSV data to MySQL:

Spring Boot Batch CSV to MySQL Conversion

This repository contains a Spring Boot Batch application that demonstrates how to efficiently process CSV data and store it in a MySQL database. This can be a valuable tool for handling large datasets and automating data import tasks.

Table of Contents

Prerequisites

Before you begin, ensure you have met the following requirements:

Getting Started

Clone this repository to your local machine:

bash
git clone https://github.com/swapniltake1/csvtomysql.git

Project Structure

The project structure follows standard Spring Boot conventions:

  • src/main/java: Contains the Java source code.
  • src/main/resources: Contains configuration files, including the application.properties file for database configuration.
  • src/test: Contains test classes.

Configuration

Before running the application, configure the MySQL database connection in the src/main/resources/application.properties file:

spring.datasource.url=jdbc:mysql://localhost:3306/your-database-name
spring.datasource.username=your-username
spring.datasource.password=your-password
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver

You can also customize other batch-related configurations in this file.

Running the Application

To run the application, use the following commands:

./mvnw clean package
java -jar target/spring-boot-batch-csv-to-mysql-1.0.0.jar

Replace spring-boot-batch-csv-to-mysql-1.0.0.jar with the actual JAR file generated.

The application will read data from a sample CSV file (data.csv), process it, and store it in the configured MySQL database.

Contributing

Contributions are welcome! If you'd like to enhance this project or fix any issues, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix: git checkout -b feature/your-feature or git checkout -b bugfix/issue-number.
  3. Make your changes and commit them: git commit -m 'Your changes'.
  4. Push your changes to your fork: git push origin feature/your-feature.
  5. Submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.


About

Welcome to the Spring Boot Batch CSV to MySQL Converter – a streamlined solution for processing large datasets, converting CSV files to MySQL databases, and optimizing data workflows effortlessly.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages