I have a database hosted on Amazon RDS. I am developing a Rails application with primary database as PostgreSQL. The Postgres database needs to be updated with data from RDS. I need to pull records from MySQL and then load it into Postgres.
Also, this is not database migrations.
One option is to create a secondary database (MySQL) in my rails application. But this does not seem a good option as I need to transfer data only when needed and not very frequently.
What is the best way to achieve this? Can this be done through pgloader?
This solved my issue. I just needed to read from MySQL and this is working fine. Are there any drawbacks for this approach?
You can use PostgreSQL's Foreign Data Wrappers : your MySQL tables will be viewed as PostgreSQL tables. See : https://www.postgresql.org/docs/current/static/postgres-fdw.html