Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Native Query Not Bringing In Transformations

Hello,

 

I am relatively new to Power BI and am wondering why my native query doesn't seem to work.  I am connecting to Qubole Presto via ODBC.  I wrote a query which does some some transformations to a particular field to create a new field.  Here is a snippet:

SELECT
case when url is not null then
substr(url,1,length(url)-strpos(reverse(url), '/')) else NULL end as baseurl, url,...

 

When I run the query in Power Query, it does return the added 'baseurl' column, but none of the string transformations applied...basically it just returns 'url' in that field.  I ran this in Presto and it worked fine.  Does Power Query not recognize the string functions?

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hello,

     

    I am able to connect to Presto. I had to rework my query.  Instead of using some of the string functions I used regex instead..that seemed to work.  I originally thought that it was my case statements that could be breaking it but I kept those in, and they still work.  Perhaps it was one of the string functions.  

     

    Thanks!

     

2 Replies