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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
mafdam89
New Member

Query with Web.Contents (POST) executed twice

Hello,


I created a new power query (reported below) in an empty pbix file.
The result is correct,(7000 rows csv file, compressed using gzip and encoded in base64) but if I trace the db or trace the request, I see that it's executed two times.
I already disabled "Allow Data Preview To Download In The Background"
Why this happen? Can someone help me?
Thanks for the support.

 

let
    url = "https://www.myurl.com",
    body = "<?xml version=""1.0"" encoding=""utf-8""?>
	        <SOAP-ENV:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:SOAP-ENV=""http://schemas.xmlsoap.org/soap/envelope/"">
			<SOAP-ENV:Body><tns:myservlet_Run xmlns:tns = ""http://.ws.localhost/"" xmlns:soap=""http://schemas.xmlsoap.org/wsdl/soap/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"">
			<tns:m_UserName>myUser</tns:m_UserName>
			<tns:m_Password>myPwd</tns:m_Password>
			</tns:myservlet_Run></SOAP-ENV:Body>
			</SOAP-ENV:Envelope>",
    Source = Xml.Tables(Web.Contents(url,[Content=Text.ToBinary(body),Headers=[#"Content-Type"="text/xml;charset=UTF-8"],RelativePath="/servlet/myservlet"])),
    Table = Source{0}[Table],
    Table1 = Table{0}[Table], 
    Table2 = Table1{0}[Table], 
    base64 = Text.Combine(Table.Column(Table2, "return")), 
    gzip = Binary.FromText(base64, BinaryEncoding.Base64), 
    xmlbin = Binary.Decompress(gzip, Compression.GZip), 
    xml = Text.FromBinary(xmlbin), 
    Table3 = Xml.Tables(xml), 
    Table4 = Table3{0}[Table], 
    Table5 = Table4{0}[Table], 
    Table6 = Table5{0}[Table], 
    EstraiCSV = Table.Column(Table6,"Records"), 
    ToText = Text.Combine(EstraiCSV, "#(cr)"), 
    Origine = Csv.Document(ToText ,[Delimiter=";", Encoding=1252, QuoteStyle=QuoteStyle.None]), 
    EndPQ = Table.PromoteHeaders(Origine , [PromoteAllScalars=true])
in
    EndPQ
2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @mafdam89

Are these two records in the trace file just the same?

Which datasoure do you connect to?

See a similar issue here solved.

 

Best Regards

Maggie

Hi Maggie
thanks for the reply,
yes, the records in the trace file are the same.
I have two file:

"Microsoft.Mashup.Container.NetFX40.10296.2018-06-05T10-21-56-390309.log"
with these lines:

DataMashup.Trace Information: 24579 : {"Start":"2018-06-05T10:21:57.6375414Z","Action":"Engine/IO/Web/Request/GetResponse","HostProcessId":"3884","RequestMethod":"POST","RequestUri":"https://www.myurl.com/servlet/myservlet","RequestHasContent":"True","RequestHasHeaders":"True","RequestHasTimeout":"True","UseCache":"True","ResponseStatusCode":"200","ProductVersion":"2.58.5103.501 (PBIDesktop)","ActivityId":"bfa72383-d67d-4092-b54e-3899689050e4","Process":"Microsoft.Mashup.Container.NetFX40","Pid":10296,"Tid":1,"Duration":"00:00:00.0250342"}
DataMashup.Trace Information: 24579 : {"Start":"2018-06-05T10:21:57.6662339Z","Action":"Engine/IO/Web/Request/GetResponse","HostProcessId":"3884","RequestMethod":"POST","RequestUri":"https://www.myurl.com/servlet/myservlet","RequestHasContent":"True","RequestHasHeaders":"True","RequestHasTimeout":"True","UseCache":"True","ResponseStatusCode":"200","ProductVersion":"2.58.5103.501 (PBIDesktop)","ActivityId":"bfa72383-d67d-4092-b54e-3899689050e4","Process":"Microsoft.Mashup.Container.NetFX40","Pid":10296,"Tid":1,"Duration":"00:00:00.0013676"}

and

"Microsoft.Mashup.Container.NetFX40.13240.2018-06-05T10-21-50-318843.log"
with these lines:

DataMashup.Trace Information: 24579 : {"Start":"2018-06-05T10:21:51.4813506Z","Action":"Engine/IO/Web/Request/GetResponse","HostProcessId":"3736","RequestMethod":"POST","RequestUri":"https://www.myurl.com/servlet/myservlet","RequestHasContent":"True","RequestHasHeaders":"True","RequestHasTimeout":"True","UseCache":"True","ResponseStatusCode":"200","ProductVersion":"2.58.5103.501 (PBIDesktop)","ActivityId":"d5c53d5d-9a6a-429f-ba46-512831535bae","Process":"Microsoft.Mashup.Container.NetFX40","Pid":13240,"Tid":1,"Duration":"00:00:01.5395413"}
DataMashup.Trace Information: 24579 : {"Start":"2018-06-05T10:21:53.0516059Z","Action":"Engine/IO/Web/Request/GetResponse","HostProcessId":"3736","RequestMethod":"POST","RequestUri":"https://www.myurl.com/servlet/myservlet","RequestHasContent":"True","RequestHasHeaders":"True","RequestHasTimeout":"True","UseCache":"True","ResponseStatusCode":"200","ProductVersion":"2.58.5103.501 (PBIDesktop)","ActivityId":"d5c53d5d-9a6a-429f-ba46-512831535bae","Process":"Microsoft.Mashup.Container.NetFX40","Pid":13240,"Tid":1,"Duration":"00:00:01.0070358"}

thanks again

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.