- Make a
POSTto/v1/statementwith the query - You get back a JSON document that might contain a
nextUrilink - The document will contain
columnsif available - The document will contain
dataif available - The
columnsfield will always be set ifdatais set (and usually earlier) - If there is no
nextUrilink, then the query is finished (either successfully completed or failed) - Otherwise, keep following the
nextUrilink - The
statusfield is only for displaying to humans as a hint about the query's state on the server. It is not in sync in the query state from the client's perspective and must not be used to determine whether the query is finished. - The document will contain an
errorfield if the query has failed — this is how you distinguish between a successfully completed query and a failed query when there is no morenextUrilink - If the response is an HTTP
503, sleep 50-100ms and try again
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def xmltodict (node) : | |
| def _xmltodict (node) : | |
| if len (node) > 0: | |
| dic = {} | |
| for child in node : | |
| [key, value] = _xmltodict (child) | |
| if dic.has_key (key) : | |
| if isinstance (dic[key], list) : | |
| dic[key].append (value) |