Forum Discussion
Create Connection: This query contains transformations that cannot be used for live connection
- 9 years ago
Hi arobin,
Could you please test using a simple SQL statement? You can create a simple table named TableA in your database, then type the basic query statement using like: select * from TableA in Direct Query model, check if it works. Some function is not used in Direct Query model. If it works fine, it will document the function is unable. You'd better test step by step.
If the function is not used, please create a new result table, then import them to Power BI. If you have any issue, please let me know.
Best Regards,
Angelia
Hi arobin,
If it works fine in SSMS, it should be fine in Power BI. Please verify you connect the SQL Server database successfuly.
Best Regards,
Angelia
Hi Angelia,
The query actually worked when I choose "Import" connectivity mode and the result gets loaded well.
However, if I use "DirectQuery" connectivity mode, it only return the result of the query and when I hit "Load"
it fails...
Please see below...
PBut when I go and hit "Load" this message appears.
- v-huizhn-msft9 years agoMicrosoft Employee
Hi arobin,
Could you please test using a simple SQL statement? You can create a simple table named TableA in your database, then type the basic query statement using like: select * from TableA in Direct Query model, check if it works. Some function is not used in Direct Query model. If it works fine, it will document the function is unable. You'd better test step by step.
If the function is not used, please create a new result table, then import them to Power BI. If you have any issue, please let me know.
Best Regards,
Angelia - Anonymous9 years agoNot applicable
I'm getting this too. Can't we call sql funtions in DirectQuery mode?
- Anonymous8 years agoNot applicable
We've just hit this issue in one of our databases. Its accessing a TABLE.
The table is using user defined data types!
A copy of the table using the underlying SQL SERVER types wokrs fine. The user has data_reader and public roles/permisisons
To give them appropriate access you need to give then VIEW DEFINITION permissions so the DB can resolve the undelrying schema shenanigins into some normal looking datatypes that PowerQuery can get its head around
GRANT VIEW DEFINITION TO TestUser;m
if you have lots of users or are using groups/roles you can grant VIEW DEFINITION to the public role of the DB assuming you're happy with the security implications.
GRANT VIEW Definition TO PUBLIC;
This seemed to work for me/us
- Aruna_ln8 years agoHelper III
I am also faceing same error. but i run my query in SSMS its succeffully run.
i am checking once again my select statement 2 line that way error
below sql statemement error becoz select statemenet 2 line that error in power bi
select col1,col2,col3,clo4
,col4,col5,col6 from TABLE1 T1
INNER JOIN TABLE2 T1 ON T1.A=T2.A
after change my query its succefully loadede in Power BI(becoz my Sql select statement is 1 line)
select col1,col2,col3,clo4,col4,col5,col6 from TABLE1 T1
INNER JOIN TABLE2 T1 ON T1.A=T2.A
any body facing this type error check once again ur query
Thanks
Aruna
- JackSprat8 years agoHelper I
Having similiar issue. When I call a view from a function, I get the 'transformation' error. When I call the view directly I get zero issues. When I call the function with the query from the view in it (Table valued function) I get zero problems. Not doing any transformations so this seems to be a misleading error. Anyway, my work around is embed the view query in the function.
( Ihave to report to a log who viewed what when, the TVF is my only route to use PowerBi given the security requirements. and it has to be direct query until I can refresh imported data more than once a day.