I have a MS SQL Server running in a different country (hence VPN, hence long round trip delay) and delveloping a PowerQuery model on a view located on that MS SQL Server. Everytime I change something in the model, it reloads the view which is consuming a lot of time. I'd like to:

  1. setup a local PostGreSQL Server on my Mac (done already)
  2. mirror the MS SQL View data into a PostgreSQL Database
  3. connect the powerQuery to the local PostgreSQL Server (easy)

I'm struggling with "2", mirror the content of a view into the PostgreSQL server without using direct SQL (TCP1433) which I cannot use.

How can I mirror the data to the PostgreSQL Server using ODBC only?

BTW: I have no direct access to the MS SQL Server apart from the ODBC connection

EDIT: If required, I can also install a MS SQL Express Edition if that helps in any way. Thanks

  • SELECT the view into a CSV file locally on SSMS, and then load that CSV directly into Postgres. – Tim Biegeleisen Aug 16 '17 at 8:33
  • It's THAT easy? stupid me .... will give it a try. Thanks – f0rd42 Aug 16 '17 at 8:34
  • Not at all a stupid question. There may be a way to directly transfer but I wouldn't expect it to be easy. But CSV is a no brainer. – Tim Biegeleisen Aug 16 '17 at 8:40
  • When using csv with postgres, it is my experience that you need to be very careful with date formats, if there are dates in the view you are importing. – Jonathan Willcock Aug 16 '17 at 8:45
  • Man this is such a compound question with obvious good intentions I'm not sure how to answer it. Is the data read-only? Can you migrate entirely to PostgreSQL (is that what you're after). What role with SQL Server play with this? – Evan Carroll Aug 16 '17 at 16:50

Yes, mirror the content of the view to a PGSQL. But never mind, I was able to do it with a local SQL express installation very easily.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.