Hello, I have a problem where reaching our DNS server on Alteryx Gallery is so slow that it sometimes times out the download tool and causes an error. Sometimes it works, Sometimes it doesn't. I know for a fact it's latency related and not due to the host website being offline or an incorrect URL.
Download Tool (DNS related): "Error transferring data: Couldn't resolve host name"
In any case, I need a way to loop the download tool until success and then it breaks the loop and continues the pipeline. Here is an example workflow (add a row with random text in the input tool to mimic failed DNS resolution).
Condition 1: Keep looping the download tool until success (no error) and break the loop to continue with the rest of the pipeline OR stop at 100 attempts.
Condition 2: Throttle each attempt with a delay of 2 seconds in-between each attempt.
Does anyone have advice on how to achieve this? Thank you.
Solved! Go to Solution.
Hey @Anonymous1,
I would look at creating an iterative macro: Creating an Iterative Macro - Alteryx Community <- check this out
Essentially the macro will keeps iterating till 100 run throughs have been made or It will stop if the header 200 (successful request) is found in the header then continue your workflow.
Any questions or issues please ask :)
HTH!
Ira
Hi Ira,
Thanks for the resource, I'll take a look at it. Do you have any advice for the second condition? Where I would like to insert a small bit of delay (2 secs) between each attempt?
No worries @Anonymous1, I would use the python tool:
Just need to add these two lines:
import time
time.sleep(3)
Sleep will stop Alteryx for the number of seconds given in the parameter.
Hm, I think I should clarify that the solution I'm looking for is not per row but per download tool run:
Will your macro & time.sleep(2) work in this scenario as well?
EDIT: I realize I can just insert the delay in the macro and not at the parent workflow.
Hi @IraWatt ,
After attempting the method you suggested in your post, I encountered an issue where I could not connect to the server. Despite having only one URL, it was failing sporadically and displaying an error message indicating a connection issue. Unfortunately, the approach you suggested did not resolve this problem. Is there another solution that could help me address this issue?
Regards,
Ariharan Rengasamy
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |