Forum Discussion
SwethaSatya
5 years agoNew Member
R Script in direct query
I am using R Script in Direct Query to retrieve data from SQL server using SP by passing logged-in user id. In Power Query Editor window, the script runs fine and retrieves data. But on applying cha...
d_gosbell
5 years agoSuper User
R script is not supported as a direct query source see https://docs.microsoft.com/en-us/power-bi/connect-data/power-bi-data-sources#data-sources-p-r
You might want to look into using either CURRENT_USER or SUSER_NAME or something like that inside your SQL query and then just use a SQL Server data source in Power Query
- SwethaSatya5 years agoNew Member
We are using SQL server authentication to connect to DB. In this scenario, how do I pass LoggedIn user as parameter to SP?
- d_gosbell5 years agoSuper User
SwethaSatya wrote:
We are using SQL server authentication to connect to DB. In this scenario, how do I pass LoggedIn user as parameter to SP?
You can't you would need to use Windows Auth to use either of those functions.