Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

R script do run on Power BI Service

Hello PBI Experts, MVPs,deldersveld

 

I have a query related to R integration in Power BI. Need immediate help!!

 

I have created a dashboard on Power BI. There is a live direct query connection build between PBI and SQL Azure database.

I have written R script in my dashboard, which do some calculation and save the output on the SQL Azure database. This output then used as input in the PBI using direct query mode. I have created RODBC connectin in my local machine.

The script runs perfectly fine on the PBI desktop however when I publish this dashboard on Power BI service and run the dashboard, R script do not run and throw errors "ODBC connection failed". Is that mean that I need to create ODBC connection on SQL Server? If yes then how to do that. Please respond with suggestion to solve this issue.

 

thanks,

Naveen

9 Replies

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Hi naveen_koushal,

     

    Have you installed and configured data gateway on your server? Also check if you have configure the data source in "Manage Gateway" in power bi service.

     

    Regards,

    Jimmy Tao

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Jimmy,

       

      Thanks for the support!

       

      Could you please more elaborate why do we require data gateway?. My data is already connected with azure sql database. And the error that comes is related to 'ODBC connection failed'.

       

      Appreciate if you elaborate the possible solution.

       

      Regards,

      Naveen

       

       

      • deldersveld's avatar
        deldersveld
        Resident Rockstar

        I don't believe you'll be able to setup and use an ODBC connection in Power BI Service. 

         

        The gateway is required in general for an R script in Power Query, but it sounds like you have this RODBC connection setup on an R Visual. That wouldn't need a gateway, but again, I don't believe you'll be able to configure ODBC since you don't have access to configure anything in the Service.