Submit Query and Poll for Results
A 5-step recipe with Teradata. We can help you get access.
Recipe · 5 steps
Submit Query and Poll for Results
with Teradata
Submit a query and poll its status until it completes, then branch on the outcome.
- Create a query session against the requested system.
- Submit the SQL statement for execution and capture the query identifier so its status can be polled.
- Retrieve the current status of the submitted query. While the status is still running the step loops back on itself; once the query is no longer running it routes to the completed or failed terminal step.
- Re-read the finished query to return the final result rows once it has completed successfully.
- Re-read the failed query to surface the error message for the caller.
What you'll need to have ready
- system: Target Vantage system name.
- username: Database username used to open the session.
- database: Default database for the session.
- query: SQL statement to execute.
- maxRows: Maximum number of rows to return.
For your developer
Arazzo workflow teradata:poll-query-results, 5 operations: createSession → executeQuery → getQueryStatus → getQueryStatus → getQueryStatus. Specs on APIs.io.