I would argue they are not equivalent technologies. Luigi is more of a workflow/process management framework that can help organize and orchestrate many different batch job
The purpose of Luigi is to address all the plumbing typically associated with long-running batch processes. You want to chain many tasks, automate them, and failures will happen. These tasks can be anything, but are typically long running things like Hadoop jobs, dumping data to/from databases, running machine learning algorithms, or anything else. https://luigi.readthedocs.io/en/stable/
Spring Batch gives you a reusable framework for structuring a batch job. It gives you a lot of things out of the box, like being able to read input from text files and write output to databases.
A lightweight, comprehensive batch framework designed to enable the development of robust batch applications vital for the daily operations of enterprise systems.
Spring Batch provides reusable functions that are essential in processing large volumes of records, including logging/tracing, transaction management, job processing statistics, job restart, skip, and resource management https://spring.io/projects/spring-batch
You could theoretically run Spring Batch jobs with Luigi.
Based on the brief description of your use case, it sounds like the bread and butter of what inspired Spring Batch in the first place. In fact, their 15 minute demo application covers the use case of reading from a file and loading records into a JDBC database https://spring.io/guides/gs/batch-processing/.
Answer from FGreg on Stack OverflowSpring batch to run python code? - Stack Overflow
Building a Python version of Spring Batch — need opinions on Easier-Batch architecture
python - Spring Batch ScriptItemProcessor - Stack Overflow
Why Python instead of Java when you hear about ETL ?
I 've been reading about ETL design patterns lately and how auditing works for data pipelines.
I didn't find any ready to use abstractions in Python unfortunately, but I stumbled upon Spring Batch, which looks like an already established solution for batch processing in Java.
I started reading, and I like it.
It simply answered a lot of the questions I had about ETL auditing and failure recovery.
I think it would be a good idea to implement some of the abstractions from Spring Batch ( only the necessary ones ) in Python and use them in my future ETLs.
what's your take on this ?
The SystemCommandTasklet allows you to execute any shell command you want including a python script if you'd like. You can read the documentation here: http://docs.spring.io/spring-batch/apidocs/org/springframework/batch/core/step/tasklet/SystemCommandTasklet.html
You can call the python progam as an executable.
A toy python program to do so is:
import java.io.*;
class Interact {
static public void main(String[] args) throws IOException {
Process p = Runtime.getRuntime().exec("python3 python_program.py arg1 arg2");
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
}
}
if python_program.py is the following
import sys
if __name__ == "__main__"
print("my args are",sys.argv[1:])
the result should be
my args are ['arg1', 'arg2']
of course on a more complete program you should read the stderr, check the return code etc...
Hey everyone,
I developed this small project on GitHub called Easier-Batch.
It tries to bring the same philosophy as Spring Batch into Python — using the familiar Reader → Processor → Writer model, job metadata tables, retries, skip logic, and checkpointing.
I’m currently designing something similar myself — a Python batch processing framework inspired by Spring Batch, built to handle large-scale ETL and data jobs.
Before I go too far, I’d like to get some opinions on the architecture and design approach.
-
Do you think this kind of structured batch framework makes sense in Python, or is it better to stick to existing tools like Airflow / Luigi / Prefect?
-
How would you improve the design philosophy to make it more "Pythonic" while keeping the robustness of Spring Batch?
-
Any suggestions for managing metadata, retries, and job states efficiently in a Python environment?
Here’s the repo again if you want to take a look:
👉 https://github.com/Daftyon/Easier-BatchWould love to hear your thoughts, especially from people who have worked with both Spring Batch and Python ETL frameworks.
This is something I've never figured out, is there anything about Python that makes it so much better than Java when it comes to tasks related to data processing?
Whenever I see job descriptions about ETL, DataWarehouse or related, Python is more often mentioned instead of Java (and other similar languages like C++/C#)