Hi,
I`m creating some views to be queried by PowerBI. In our delta tables we have a column called database name which contains the source systems database name. What I`m doing is using this to filter data WHERE databaseName = current_database(). Now I`ve had to replace the `s that come through this value and all works ok when queried within a worksheet, i.e. if I change database\schema context, my rows get filtered. However, if I query the same view from PowerBI, I got no data at all. I`ve tested the view using a hardcoded database name i.e. WHERE databaseName = 'the database name' and that works fine. The ony thing I could think it could be is priviledges, as the PAT token created for access by PowerBI only has SELECT priviledges on the database, wondering if it can`t use the Current_Database() function or similar.
Drk.