Search code examples
mongodboutputluigi

MongoDB in Luigi Python


I would like to know if there is a way to output to a MongoDB in Luigi. I see in the documentation they support files (local FS, HDFS), S3, PostgreSQL but not MongoDB. If not, could someone explain me why not? Maybe it is a bad idea to have it? I would like to store the data in a database because then I can explore it by querying it. However I am using mongodb and I would not like to install another database. I do not need a relational database as I am using the database only to store and query ( NoSql ) without relationships, so the best option is mongodb.

Basically I need a task to read the data and save it in the database. Then the next task take this output and process the data.

Any recommendation, suggestion or clarification is more than welcome. Thanks!


Solution

  • You can try using mortar-luigi.

    Check out this link for MongoDB tasks and this example.