Forum Discussion

alex's avatar
alex
Helper I
7 years ago

Can PowerQuery accept a csv file from a web service (specifically Tableau)?

Hello,

 

We have a Tableau server which can provide data via a CSV file.

(If you are in a browser, you goto http://my.tableau.server.com/site/MyReport.CSV and then the browser downloads a CSV file to your Downloads folder :smileyhappy:    The Tableau server uses the windows credentials for authentication)

 

I'd love to import this data via PowerQuery.  Is this possible and can you point me to how to start?

 

When I do this in power query:

let
    Source = Table.FromColumns({Lines.FromBinary(Web.Contents("https://my.tableau.server.com/#/site/MyReport.csv"))})
in
    Source

 

I get this:

<!DOCTYPE html><html xmlns:ng="" xmlns:tb=""><head ng-csp><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=1024, maximum-scale=2"><meta name="format-detection" content="telephone=no"><meta name="vizportal-config" data-buildId="819vpf68wrqrryd7mv8zd7vi" data-staticAssetsUrlPrefix=""><link rel="stylesheet" type="text/css" href="vizportal.css?819vpf68wrqrryd7mv8zd7vi"><script src="/javascripts/api/tableau-2.2.1.min.js?819vpf68wrqrryd7mv8zd7vi"></script><script src="vizportalMinLibs.js?819vpf68wrqrryd7mv8zd7vi"></script><script src="vizportal.min.js?819vpf68wrqrryd7mv8zd7vi"></script></head><body class="tb-body"><div ng-app="VizPortalRun" id="ng-app" tb-window-resize class="tb-app"><div ui-view="" class="tb-app-inner"></div><tb:react-toaster></tb:react-toaster><script type="text/ng-template" id="inline_stackedElement.html"><div tb-window-resize tb-left="left" tb-top="top" tb-right="right" tb-bottom="bottom" tb-visible="visible" class="tb-absolute"></div></script><tb:stacked-elements></tb:stacked-elements></div></body></html>

 

 

Many Thanks,

Alex

5 Replies

    • alex's avatar
      alex
      Helper I

      I get this...which is the same DOCTYPE HTML page...it's not actually accepting the CSV....

       

      (whoops:  reuploaded screenshot...)

      • Anonymous's avatar
        Anonymous
        Not applicable

        alex ,

        Does Tableau provide Rest API  to access the CSV? You are able to connect to REST API in the web connector of Power BI Desktop.

        Regards,
        Lydia