class_docstr: A StreamAlert Athena Client for creating tables, databases, and executing queries
  
  Attributes:
      database: Athena database name where tables will be queried
class_docstr_tok: ["A","StreamAlert","Athena","Client","for","creating","tables",",","databases",",","and","executing","queries","Attributes",":","database",":","Athena","database","name","where","tables","will","be","queried"]
docstr: Run Athena queries and get results back. This is a blocking operation
  
  Args:
      query (str): SQL query to execute
  
  Returns:
      dict: Response object with the result of the running query
  
  Raises:
      AthenaQueryExecutionError: If any failure occurs during the execution of the
          query, this exception will be raised
docstr_tok: ["Run","Athena","queries","and","get","results","back",".","This","is","a","blocking","operation","Args",":","query","(","str",")",":","SQL","query","to","execute","Returns",":","dict",":","Response","object","with","the","result","of","the","running","query","Raises",":","AthenaQueryExecutionError",":","If","any","failure","occurs","during","the","execution","of","the","query",",","this","exception","will","be","raised"]
code: def run_query_for_results(self, query):
      """Run Athena queries and get results back. This is a blocking operation
  
      Args:
          query (str): SQL query to execute
  
      Returns:
          dict: Response object with the result of the running query
  
      Raises:
          AthenaQueryExecutionError: If any failure occurs during the execution of the
              query, this exception will be raised
      """
      execution_id = self._execute_and_wait(query)
      query_results = self._client.get_query_results(
          QueryExecutionId=execution_id
      )
  
      # The idea here is to leave the processing logic to the calling functions.
      # No data being returned isn't always an indication that something is wrong.
      # When handling the query result data, iterate over each element in the Row,
      # and parse the Data key.
      # Reference: https://bit.ly/2tWOQ2N
      if not query_results["ResultSet"]["Rows"]:
          LOGGER.debug(
              "The query %s returned empty rows of data", query
          )
  
      return query_results
  
imports: from datetime import datetime
  import posixpath
  import backoff
  import boto3
  from botocore.exceptions import ClientError
  from streamalert.shared.backoff_handlers import backoff_handler, success_handler
  import streamalert.shared.helpers.boto
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 13 for calling the AthenaClient obj's underlying member method code with example usage: obj.run_query_for_results(query) and returns: query_results