class_docstr: Interact with Amazon Redshift Data API.
  
  Provide thin wrapper around
  :external+boto3:py:class:`boto3.client("redshift-data") <RedshiftDataAPIService.Client>`.
  
  Additional arguments (such as ``aws_conn_id``) may be specified and
  are passed down to the underlying AwsBaseHook.
  
  .. seealso::
      - :class:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`
      - `Amazon Redshift Data API         <https://docs.aws.amazon.com/redshift-data/latest/APIReference/Welcome.html>`__
class_docstr_tok: ["Interact","with","Amazon","Redshift","Data","API",".","Provide","thin","wrapper","around",":","external+boto3",":","py",":","class",":","`","boto3.client","(","``","redshift-data","''",")","<","RedshiftDataAPIService.Client",">","`",".","Additional","arguments","(","such","as","``","aws_conn_id","``",")","may","be","specified","and","are","passed","down","to","the","underlying","AwsBaseHook",".","..","seealso",":",":","-",":","class",":","`","airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook","`","-","`","Amazon","Redshift","Data","API","<","https",":","\/\/docs.aws.amazon.com\/redshift-data\/latest\/APIReference\/Welcome.html",">","`","__"]
code: def wait_for_results(self, statement_id, poll_interval):
      while True:
          self.log.info("Polling statement %s", statement_id)
          resp = self.conn.describe_statement(
              Id=statement_id,
          )
          status = resp["Status"]
          if status == "FINISHED":
              num_rows = resp.get("ResultRows")
              if num_rows is not None:
                  self.log.info("Processed %s rows", num_rows)
              return status
          elif status in ("FAILED", "ABORTED"):
              raise ValueError(
                  f"Statement {statement_id!r} terminated with status {status}. "
                  f"Response details: {pformat(resp)}"
              )
          else:
              self.log.info("Query %s", status)
          time.sleep(poll_interval)
  
file_path: airflow/airflow/providers/amazon/aws/hooks/redshift_data.py
imports: from __future__ import annotations
  import time
  from pprint import pformat
  from typing import TYPE_CHECKING, Any, Iterable
  from airflow.providers.amazon.aws.hooks.base_aws import AwsGenericHook
  from airflow.providers.amazon.aws.utils import trim_none_values
label_desc: Use image node_id 3 for calling the RedshiftDataHook obj's underlying member method code with example usage: obj.wait_for_results(statement_id, poll_interval) and returns: status