Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I write a Luigi workflow for loading data into Redshift from MySQL?

Does Luigi have support for me to execute the entire flow?

The flow would be something like this: Dumping MySQL data to S3, then moving the data to Redshift using the Copy command.

Can I execute the above workflow using Luigi?

like image 705
Dawny33 Avatar asked Dec 14 '25 17:12

Dawny33


1 Answers

Basically you can do anything that you can do with a python script, in Luigi, since you can write that python code in the run() method of Luigi tasks, which means there is no real limits actually.

See the Luigi docs for tasks, and in particular the run() method, for more information: http://luigi.readthedocs.org/en/stable/tasks.html#task-run

So, the remaining question is then how to access RedShift and MySQL from python itself, but that is a separate question, for which I think googling around for a good guide or tutorial is the best option.

like image 119
Samuel Lampa Avatar answered Dec 16 '25 05:12

Samuel Lampa