Forum Discussion
croberts21
4 years agoContinued Contributor
Use SQL Statement as a data source because it's 10x faster.
Power BI desktop can be very slow over an ODBC connection with Postgresql. It can get an out of memory error or use a lot of resources. It can take 10-20 minutes or more to get data from one table with millions of records. Here's a fast way to limit the records and skip the Transform step which can be very time-consuming. Use an SQL statement as the data source.
- Go to Home tab bar.
- Choose Get Data dropdown and click More.
- Search for ODBC and choose ODBC. Click Connect button.
- A window will pop up. Click arrow on Advanced Options.
- Enter your SQL statement in the "SQL Statement" box.
To edit the SQL statement:
- On the far right of PBI, under the Fields pane, right click the table, choose Edit Query.
- A Power Query Editor window will pop up.
- On the far right, under Applied Steps, double click Source.
- Another window will pop up with your SQL statement which you can edit.
- After editing the SQL click the OK button.
- Now you are back to the Power Query editor. In the upper left of the window click Close & Apply.
Thanks for all your help people! I hope this helps someone.
1 Reply
- v-jingzhangCommunity Support