{"id":20008098,"url":"https://github.com/sboussekeyt/spring-batch-rs","last_synced_at":"2025-05-04T19:34:28.398Z","repository":{"id":153099440,"uuid":"625129965","full_name":"sboussekeyt/spring-batch-rs","owner":"sboussekeyt","description":"A toolkit for building enterprise-grade batch applications","archived":false,"fork":false,"pushed_at":"2025-04-10T17:57:38.000Z","size":349,"stargazers_count":6,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-27T01:48:18.331Z","etag":null,"topics":["batch","csv","json","mongodb","mysql","postgres","rust","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sboussekeyt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-08T06:44:07.000Z","updated_at":"2025-04-10T17:57:41.000Z","dependencies_parsed_at":"2024-04-01T23:23:44.508Z","dependency_job_id":"2128526d-3c33-4e1d-92ce-fefb1c5b4e3c","html_url":"https://github.com/sboussekeyt/spring-batch-rs","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sboussekeyt%2Fspring-batch-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sboussekeyt%2Fspring-batch-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sboussekeyt%2Fspring-batch-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sboussekeyt%2Fspring-batch-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sboussekeyt","download_url":"https://codeload.github.com/sboussekeyt/spring-batch-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252389913,"owners_count":21740230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch","csv","json","mongodb","mysql","postgres","rust","sqlite"],"created_at":"2024-11-13T07:08:25.902Z","updated_at":"2025-05-04T19:34:28.027Z","avatar_url":"https://github.com/sboussekeyt.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e \n  \u003ch1\u003eSpring-Batch for Rust\u003c/h1\u003e\n  \u003ch3\u003e🐞 A toolkit for building enterprise-grade batch applications\u003c/h3\u003e\n\n  [![crate](https://img.shields.io/crates/v/spring-batch-rs.svg)](https://crates.io/crates/spring-batch-rs)\n  [![docs](https://docs.rs/spring-batch-rs/badge.svg)](https://docs.rs/spring-batch-rs)\n  [![build status](https://github.com/sboussekeyt/spring-batch-rs/actions/workflows/test.yml/badge.svg)](https://github.com/sboussekeyt/spring-batch-rs/actions/workflows/test.yml)\n  [![Discord chat](https://img.shields.io/discord/1097536141617528966.svg?logo=discord\u0026style=flat-square)](https://discord.gg/9FNhawNsG6)\n  [![CodeCov](https://codecov.io/gh/sboussekeyt/spring-batch-rs/branch/main/graph/badge.svg)](https://codecov.io/gh/sboussekeyt/spring-batch-rs)\n  ![license](https://shields.io/badge/license-MIT%2FApache--2.0-blue)\n\n\u003c/div\u003e\n\n# Spring-Batch for Rust\nSpring Batch for Rust, offers a robust and flexible framework for the development of batch processing applications, addressing the challenges of handling large-scale data processing tasks efficiently and reliably. It provides developers a comprehensive toolkit for building enterprise-grade batch applications.\n\n## Features\n| **Feature**   | **Description**                                               |\n|---------------|---------------------------------------------------------------|\n| mongodb       | Enable reader and writer for Mongodb database                 |\n| rdbc-postgres | Enable rdbc reader and writer for Postgres database           |\n| rdbc-mysql    | Enable rdbc reader and writer for Mysql and MariaDb databases |\n| rdbc-sqlite   | Enable rdbc reader and writer for Sqlite database             |\n| json          | Enable json reader and writer                                 |\n| csv           | Enable csv reader and writer                                  |\n| fake          | Enable fake reader. Useful for generate fake dataset          |\n| logger        | Enable logger writer. Useful for debugging                    |\n\n## Roadmap\n+ XML reader and writer\n+ Filter items\n+ Kafka reader and writer\n+ Pulsar reader and writer\n+ Retry/Skip policies\n+ Save execution data in database\n\n ## Getting Started\n Make sure you activated the suitable features crate on Cargo.toml:\n\n```toml\n[dependencies]\nspring-batch-rs = { version = \"\u003cversion\u003e\", features = [\"\u003cfull|json|csv|fake|logger\u003e\"] }\n```\n\nThen, on your main.rs:\n\n```rust,no_run\nfn main() -\u003e Result\u003c(), BatchError\u003e {\n    let csv = \"year,make,model,description\n   1948,Porsche,356,Luxury sports car\n   1995,Peugeot,205,City car\n   2021,Mazda,CX-30,SUV Compact\n   1967,Ford,Mustang fastback 1967,American car\";\n\n    let reader = CsvItemReaderBuilder::new()\n        .delimiter(b',')\n        .has_headers(true)\n        .from_reader(csv.as_bytes());\n\n    let processor = UpperCaseProcessor::default();\n\n    let writer = JsonItemWriterBuilder::new().from_path(temp_dir().join(\"cars.json\"));\n\n    let step: Step\u003cCar, Car\u003e = StepBuilder::new()\n        .reader(\u0026reader) // set csv reader\n        .writer(\u0026writer) // set json writer\n        .processor(\u0026processor) // set upper case processor\n        .chunk(2) // set commit interval\n        .skip_limit(2) // set fault tolerance\n        .build();\n\n    let job = JobBuilder::new().start(Box::new(\u0026step)).build();\n    let result = job.run();\n\n    assert!(result.is_ok());\n    assert!(step.get_status() == StepStatus::Success);\n\n    Ok(())\n}\n```\n\n## Examples\n+ [Generate CSV file from JSON file with processor](https://github.com/sboussekeyt/spring-batch-rs/blob/main/examples/generate_csv_file_from_json_file_with_processor.rs)\n+ [Generate JSON file from CSV string with fault tolerance](https://github.com/sboussekeyt/spring-batch-rs/blob/main/examples/generate_json_file_from_csv_string_with_fault_tolerance.rs)\n+ [Generate JSON file from fake persons](https://github.com/sboussekeyt/spring-batch-rs/blob/main/examples/generate_json_file_from_fake_persons.rs)\n+ [Generate CSV file without headers from fake persons](https://github.com/sboussekeyt/spring-batch-rs/blob/main/examples/generate_csv_file_without_headers_from_fake_persons.rs)\n+ [Insert records into Mysql database](https://github.com/sboussekeyt/spring-batch-rs/blob/main/examples/insert_records_into_mysql_database.rs)\n+ [Log records from Postgres database](https://github.com/sboussekeyt/spring-batch-rs/blob/main/examples/log_records_from_postgres_database.rs)\n+ [Read records from MongoDb database](https://github.com/sboussekeyt/spring-batch-rs/blob/main/examples/read_records_from_mongodb_database.rs)\n+ [Write records to MongoDb database](https://github.com/sboussekeyt/spring-batch-rs/blob/main/examples/write_records_to_mongodb_database.rs)\n\n## License\n Licensed under either of\n\n-   Apache License, Version 2.0\n    ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n-   MIT license\n    ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n## Contribution\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsboussekeyt%2Fspring-batch-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsboussekeyt%2Fspring-batch-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsboussekeyt%2Fspring-batch-rs/lists"}