A few days ago it was time to do another transformation of SQL to RDF. This time my goal was to have a ETL script which has as few as possible dependencies and can be used out of the box without changing the system it runs on.
This is where docker enters the game. Thanks to process injection there is an easy way to load an SQL dump into a docker container:
Start a mysql instance
This starts a docker container with name
dump using the official MySQL docker image. It also makes the database available to the host on standard port
Load the SQL dump
Et voilà: the dump is loaded! Note that the
-i option allows to use input redirection from the host right into the docker container.