Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

73
Views
Load data into Postgres from MySQL

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?

UPDATE

This solved my issue. I just needed to read from MySQL and this is working fine. Are there any drawbacks for this approach?

9 months ago · Santiago Trujillo
1 answers
Answer question

0

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

9 months ago · Santiago Trujillo Report
Answer question
Find remote jobs