Forum Discussion
OLE DB or ODBC error: [DataSource.Error] ODBC: ERROR [42601] SQL compilation error: ambiguous column
- 5 years ago
In this case the best (and preferred option) in my opition is to create a view in snowflake.
Inside the view rename the field. The connect PowerBi to View instead of Table
Do not rename the field directly in the table. I wouldnt recommend that
Correct, I agree that is the problem with the query. However, I did not write that query, Power BI DirectQuery did.
I found that query in my Snowflake query history after getting the error in Power BI.
If i remember correctly you can not write a custom query and send it through PowerBI to snowflake.
You can only connect directly to tables in Snowflake. Corrct me if im wrong.
My understanding is that you have multiple steps in Power Query editor and one of the steps joins 2 tables. Is this right?
If this is the case, i think the best way to overcome this issue is by adding one more step and delete the duplicate columns from the table you are not interested in. I hope tis makes sense??
- jacob-dickey5 years agoFrequent Visitor
Correct, from what I can understand, you cannot send custom queries through Power BI. You can only bring in tables and join them by creating relationships in the data model. This is how I joined the tables that appear in my query above.
I agree, I think the problem will be solved if one of the "CREATED" columns was removed from the data model so that only one would appear in the DirectQuery result. However, I am using both "CREATED" columns in various parts of the report.
Do you think currently the only option would be to edit the base table in Snowflake to rename the column? If so, I would consider this error to be a bug for Power BI. I would think it should be able to handle this kind of report operation.- themistoklis5 years ago
Community Champion
In this case the best (and preferred option) in my opition is to create a view in snowflake.
Inside the view rename the field. The connect PowerBi to View instead of Table
Do not rename the field directly in the table. I wouldnt recommend that
- jacob-dickey5 years agoFrequent Visitor
I agree, unfortunately, I think this might be the only viable solution right now. I wish there was a better way since this will cause some rework, but this should still work. Thank you for your help!