Retry api request if fails
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2021 01:10 PM
I have a simple API request to query a table and retrive data, which are then suited into a dataframe. May happened, it fails due to different reasons. How to retry it for let's say 5 times when any kind of error takes place?
Here is an api request:
df = spark.createDataFrame(sf.bulk.MyTable.query("select Id, Status from MyTable "))
Labels:
- Labels:
-
Python