Skip to main content

Power BI

New

Materialized views in PostgreSQL

Vote (57) Share
Helge Larsen's profile image

Helge Larsen on 02 Feb 2017 22:54:03

When I connect Power Query to a PostgreSQL database I get a list of tables and views in the database. But materialized views are not shown. I would suggest that Power Query would be able to connect to materialized views, too.

Comments (13)
Helge Larsen's profile image Profile Picture

2f7a2f76 ec76-4448-8dba-d4610f91ce7f on 05 Jul 2020 23:39:38

RE: Materialized views in PostgreSQL

'You can access to a materialized view in PostGre by writing a request like that :

= public_Schema{[Name="XXXXX",Kind="View"]}[Data]

Tip: create first a new source and then just change the table name XXXXX

Helge Larsen's profile image Profile Picture

36d0683e c2be-4c7d-873f-a6f25f1b0d91 on 05 Jul 2020 23:39:00

RE: Materialized views in PostgreSQL

Create your own normal view or just do the Advanced option in the Get Data and do a Select statement from the materialized view in there.

Helge Larsen's profile image Profile Picture

c3d709ce 53dc-4f16-a458-2b1961552527 on 05 Jul 2020 23:36:27

RE: Materialized views in PostgreSQL

Incredible that materialized views are not supported yet. Can this be fixed? I just upgraded PostgreSQL to be able use materialized views for performance reasons and PowerBI just killed it. OK, let's stay with workaround...

Helge Larsen's profile image Profile Picture

9e33739d 559f-4dd4-90ef-e7de521a492f on 05 Jul 2020 23:36:12

RE: Materialized views in PostgreSQL

A nice workaround is to create a view in PostgreSQL for the materialized view. Worked wonders. Indexed views in SQL server do not allow for remote access. Hopefully SQL server 2016 may have those features available.

Helge Larsen's profile image Profile Picture

6b1d4b81 7117-4c50-bc5a-e9e4f4ad42b1 on 05 Jul 2020 23:35:57

RE: Materialized views in PostgreSQL

'+1. We are currently handling millions of records which views cannot be used and we thought of using materialized view. Please bring this basic feature

Helge Larsen's profile image Profile Picture

3b8fd118 ef47-4f71-9025-76619557bc77 on 05 Jul 2020 23:34:28

RE: Materialized views in PostgreSQL

'+1 We just purchased PowerBI for connecting to PostgreSQL. Material views are a solid requirement for us. I am questioning the decision if its apparently that hard to get what we need especially since material views are not that much different as a consumer of data.

Helge Larsen's profile image Profile Picture

a2fb1e5e 9013-4f36-b9f7-77a8b5b59377 on 05 Jul 2020 23:33:37

RE: Materialized views in PostgreSQL

I would also find this very useful. Don't see what's the problem with implementing this.

Helge Larsen's profile image Profile Picture

9c6dd181 26b0-41a9-8279-16edf15dec78 on 05 Jul 2020 23:30:37

RE: Materialized views in PostgreSQL

Up for this, very helpful in reporting where you can just refresh the data via a Materialized View instead of creating multiple tables, which is considered to be a bad practice in the principles of data warehouse.

Helge Larsen's profile image Profile Picture

928592fe ade9-4424-9d86-328c5b099bc4 on 05 Jul 2020 23:30:28

RE: Materialized views in PostgreSQL

We are in a similar situation where we have materialised view built on PostgreSQL but Power BI was not able to use due to the limitation of Power BI

Microsoft has any plan to support the MV feature of PostgreSQL in the future release ?

Helge Larsen's profile image Profile Picture

5897ee16 28a1-4f37-927e-2af255113a6e on 05 Jul 2020 23:27:19

RE: Materialized views in PostgreSQL

MV is a reporting object and if this is not supported then it would lead us to use other reporting tools that do support . So how about some comment from the PowerBI team? as per below ?