Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

powerbi online refresh fails after colum is removed even though column is not referenced in model

I have a model online tha connects to a postgres view that is beeing build by end users in postgres.
the view changes often
new columns are beeing added and columns are beeing removed.

I connect to the view with a direct query like this

= Value.NativeQuery(PostgreSQL.Database(db_host, db_schema),"select * from "&db_name&".View name ", null, [EnableFolding=true])
I don't do any other transformation on power query (for example referencing any column on a later step)

the problem is that whenever a column from the view is deleted the online refresh of the model breaks
with the following error
Data source error: The 'COLUMN NAME ' column does not exist in the rowset.
even though the specific column is not referenced anywhere.

on the desktop power bi , if i hit refresh the error is not replicated and the desktop version does the refresh normaly.
so every time something changes on the view I have to open desktop version update localy and push new versiion online


i tried with different connection method 
like ODBC and 
let
    Source = PostgreSQL.Database("xxxxx", "xxxx", [CreateNavigationProperties=false]),
    a= Source{[Schema="public",Item="xxxxxxxx"]}[Data]
in
    a


but i get the same problem 

any ideas on how to address  this?

 

 

 

Status: New
Comments
v-lili6-msft
Community Support

HI  

Try to update the query as below:

= Value.NativeQuery(PostgreSQL.Database(db_host, db_schema),"select * from "&db_name&".View name ")

 

Regards,

Lin

gioris_g
Regular Visitor

@v-lili6-msft thanks for the reccomendation , unfortunately that does not work.
aparently it seems that 

"

When a dataset refreshes in services, it looks our for all the columns irrespective of whether they are referenced in the report in any applied step or even used in any visualization. Dataset refresh in services doesn't have the capability to validate if the existing column is used somewhere or not. This is the reason why it will throw error in services refresh."

 

this is crazy!

it removes the possibility to reference a view that is dynamicly created .
It should be adressed by the power bi team

 

v-lili6-msft
Community Support

hi

you could submit a support ticket to get further help from power bi support team.

submit a support ticketsubmit a support ticket

 

Regards,

Lin