Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
LewisM1991
New Member

Table not found using Web option in Get Data

Hi,

 

Power BI first timer here looking at migrate from the darkside (Tableau).

 

I am looking to connect to a URL: http://live.tissottiming.com/?id=00030E0002010264FFFFFFFFFFFFFFF2&style=Tissot

 

The web option doesn't find the table of data within  the web page.

 

Can anyone tell me the prerequisites when connecting via the web and also where i'm going wrong here?

 

I'm sure this is a silly question but I seem to be stuck at the first hurdle.

 

Thanks for any help.

 

Lewis

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee


@LewisM1991 wrote:

Hi,

 

Power BI first timer here looking at migrate from the darkside (Tableau).

 

I am looking to connect to a URL: http://live.tissottiming.com/?id=00030E0002010264FFFFFFFFFFFFFFF2&style=Tissot

 

The web option doesn't find the table of data within  the web page.

 

Can anyone tell me the prerequisites when connecting via the web and also where i'm going wrong here?

 

I'm sure this is a silly question but I seem to be stuck at the first hurdle.

 

Thanks for any help.

 

Lewis


@LewisM1991

I think it is the limitation. When connecting to a web page, the "web" connector can only get the plain/static html. And yes, the table is not there when viewing the html page source.

Capture.PNG

 

I think it is some ajax that fills the page with data after the page loaded. When monitoring the network traffic we can actually capture the ajax request and reponse. There‘s a workaround by using Power Query but it might be not reliable.

 

Capture.PNG

 

let
     
    url = "http://live.tissottiming.com/signalr/send?transport=serverSentEvents&clientProtocol=1.5&connectionToken=H8tgsE0L2n0T5MugiJaNzFlb91%2B4AtmorAddMex8lOXVxZcnw6DTWVj3QOSVeKy6dCutjqka78%2B3ta5ZEvfkb9I0yTw8DxdJkxFOM6OIgEuMHb1bdwGsI3AGXp4PQfyq&connectionData=%5B%7B%22name%22%3A%22livehub%22%7D%5D",
    body = "data={""H"":""livehub"",""M"":""GetLastData"",""A"":[""00030E0002010264FFFFFFFFFFFFFFF2""],""I"":1}",
    Source = Json.Document(Web.Contents(url,[
             
         Headers = [#"Content-Type"="application/x-www-form-urlencoded; charset=UTF-8"],
         Content = Text.ToBinary(body) 
             ]   
        )),
    #"Converted to Table" = Record.ToTable(Source),
    #"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Value] <> "1")),
    #"Expanded Value" = Table.ExpandRecordColumn(#"Filtered Rows", "Value", {"CssVersion", "Datas", "DocMgmtId", "GeneratedTime", "JavascriptVersion", "MessageNumber", "Sport", "Template", "TypeXML"}, {"Value.CssVersion", "Value.Datas", "Value.DocMgmtId", "Value.GeneratedTime", "Value.JavascriptVersion", "Value.MessageNumber", "Value.Sport", "Value.Template", "Value.TypeXML"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Value",{"Value.DocMgmtId", "Value.GeneratedTime", "Value.JavascriptVersion", "Value.MessageNumber", "Value.Sport", "Value.Template", "Value.TypeXML", "Value.CssVersion", "Name"}),
    #"Added Custom" = Table.AddColumn(#"Removed Columns", "Custom", each Xml.Document([Value.Datas]))
in
    #"Added Custom"

 

View solution in original post

2 REPLIES 2
Eric_Zhang
Employee
Employee


@LewisM1991 wrote:

Hi,

 

Power BI first timer here looking at migrate from the darkside (Tableau).

 

I am looking to connect to a URL: http://live.tissottiming.com/?id=00030E0002010264FFFFFFFFFFFFFFF2&style=Tissot

 

The web option doesn't find the table of data within  the web page.

 

Can anyone tell me the prerequisites when connecting via the web and also where i'm going wrong here?

 

I'm sure this is a silly question but I seem to be stuck at the first hurdle.

 

Thanks for any help.

 

Lewis


@LewisM1991

I think it is the limitation. When connecting to a web page, the "web" connector can only get the plain/static html. And yes, the table is not there when viewing the html page source.

Capture.PNG

 

I think it is some ajax that fills the page with data after the page loaded. When monitoring the network traffic we can actually capture the ajax request and reponse. There‘s a workaround by using Power Query but it might be not reliable.

 

Capture.PNG

 

let
     
    url = "http://live.tissottiming.com/signalr/send?transport=serverSentEvents&clientProtocol=1.5&connectionToken=H8tgsE0L2n0T5MugiJaNzFlb91%2B4AtmorAddMex8lOXVxZcnw6DTWVj3QOSVeKy6dCutjqka78%2B3ta5ZEvfkb9I0yTw8DxdJkxFOM6OIgEuMHb1bdwGsI3AGXp4PQfyq&connectionData=%5B%7B%22name%22%3A%22livehub%22%7D%5D",
    body = "data={""H"":""livehub"",""M"":""GetLastData"",""A"":[""00030E0002010264FFFFFFFFFFFFFFF2""],""I"":1}",
    Source = Json.Document(Web.Contents(url,[
             
         Headers = [#"Content-Type"="application/x-www-form-urlencoded; charset=UTF-8"],
         Content = Text.ToBinary(body) 
             ]   
        )),
    #"Converted to Table" = Record.ToTable(Source),
    #"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Value] <> "1")),
    #"Expanded Value" = Table.ExpandRecordColumn(#"Filtered Rows", "Value", {"CssVersion", "Datas", "DocMgmtId", "GeneratedTime", "JavascriptVersion", "MessageNumber", "Sport", "Template", "TypeXML"}, {"Value.CssVersion", "Value.Datas", "Value.DocMgmtId", "Value.GeneratedTime", "Value.JavascriptVersion", "Value.MessageNumber", "Value.Sport", "Value.Template", "Value.TypeXML"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Value",{"Value.DocMgmtId", "Value.GeneratedTime", "Value.JavascriptVersion", "Value.MessageNumber", "Value.Sport", "Value.Template", "Value.TypeXML", "Value.CssVersion", "Name"}),
    #"Added Custom" = Table.AddColumn(#"Removed Columns", "Custom", each Xml.Document([Value.Datas]))
in
    #"Added Custom"

 

Thanks for taking the time to reply, I'll give this a go.

 

Much appreciated.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.