Forum Discussion
datasource.error the web page function didnt finish within timeout of 100 seconds
You may try to add Timeout parameter like
= ...(Web.Contents("URL", [Timeout=#duration(0,0,20,0)])),...
(20 min is here)
i did try to add that to my table but it didnt allow it. it said token rightbracket expected.
also, all of those seem to be where the query source is from the web.
wheres my query source is to append 6 other tables. ( although they get thier source from the web )
so im not sure if that works for my query.
however
i added it like this
let
Source = Table.Combine({AppendS1, AppendS2, Appends3, Appends4, Appends5, Appends6}[Timeout=#duration(0,0,20,0)])),
#"Removed Duplicates" = Table.Distinct(Source, {"Column1"}),
#"Sorted Rows" = Table.Sort(#"Removed Duplicates",{{"Column1", Order.Ascending}})
in
#"Sorted Rows"
but when i click show error it points me to the = sign after the timeout
not sure whats going on really with it
- SergeiBaklanJul 22, 2021Diamond Contributor
Timeout is the optional parameter for Web.Contents() Web.Contents - PowerQuery M | Microsoft Docs , not for Table.Combine(). Error says you have timeout error querying some them.
As for your code I'd recommend to add Index column after Table.Combine() to fix table in memory, after that sort, after that remove duplicates and after that remove Index column.
- stever78Jul 22, 2021Brass Contributorok sergei, thanks for reply
so are you saying that adding an index column after table.combine would help or speed up the refresh time of the query? or is there another reason for doing this.
i.e you mention fix table in memory?? could you please inform me what this means? to do with amount of memory it uses up?, thanks, steve- SergeiBaklanJul 22, 2021Diamond Contributor
Nope, that not necessary improves performance. The goal is to ensure your table will be sorted correctly. Due to so called lazy evaluation Table.Sort() may sort the table only partially by parts which are currently loaded in memory. The workaround is to push loading of the entire table into memory using Table.Buffer() as here Remove Duplicates and Keep the Last Record with Power Query - Excelerator BI or by adding/removing Index column which do exactly the same.
Above is not golden rule which warranty result on 100%, but in most cases it works.
Related topic is documented here Common Authoring Issues in Power Query | Microsoft Docs
- LorenzoJul 22, 2021Silver Contributor
Hi stever78
That's not where [Timeout=#duration(0,0,20,0)] should go
Let's assume that your query Appends6 is the only one that gets data from the Web
Edit query Appends6. You should find a line that says something like:xyz = ...Web.Contents("https://abcd...")change the above so it says:
xyz = ...Web.Contents("https://abcd...", [Timeout=#duration(0,0,20,0)])If you can get it to work please attach your workbook to your next reply please
- stever78Jul 22, 2021Brass Contributorthanks for this LZ. I understand what your saying there. ill have to take a look because my web addresses are now stored in a cell. so the source in those queries gets the address from that cell.
getAddress . ill look into it and explain better. but i see what your saying here