class_docstr: This hook is a wrapper around the spark-sql binary; requires the "spark-sql" binary to be in the PATH.
  
  :param sql: The SQL query to execute
  :param conf: arbitrary Spark configuration property
  :param conn_id: connection_id string
  :param total_executor_cores: (Standalone & Mesos only) Total cores for all executors
      (Default: all the available cores on the worker)
  :param executor_cores: (Standalone & YARN only) Number of cores per
      executor (Default: 2)
  :param executor_memory: Memory per executor (e.g. 1000M, 2G) (Default: 1G)
  :param keytab: Full path to the file that contains the keytab
  :param master: spark://host:port, mesos://host:port, yarn, or local
      (Default: The ``host`` and ``port`` set in the Connection, or ``"yarn"``)
  :param name: Name of the job.
  :param num_executors: Number of executors to launch
  :param verbose: Whether to pass the verbose flag to spark-sql
  :param yarn_queue: The YARN queue to submit to
      (Default: The ``queue`` value set in the Connection, or ``"default"``)
docstr: Remote Popen (actually execute the Spark-sql query).
  
  :param cmd: command to append to the spark-sql command
  :param kwargs: extra arguments to Popen (see subprocess.Popen)
docstr_tok: ["Remote","Popen","(","actually","execute","the","Spark-sql","query",")",".",":","param","cmd",":","command","to","append","to","the","spark-sql","command",":","param","kwargs",":","extra","arguments","to","Popen","(","see","subprocess.Popen",")"]
code: def run_query(self, cmd: str = "", **kwargs: Any) -> None:
      """
      Remote Popen (actually execute the Spark-sql query).
  
      :param cmd: command to append to the spark-sql command
      :param kwargs: extra arguments to Popen (see subprocess.Popen)
      """
      spark_sql_cmd = self._prepare_command(cmd)
  
      self._sp = subprocess.Popen(
          spark_sql_cmd,
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT,
          universal_newlines=True,
          **kwargs,
      )
  
      for line in iter(self._sp.stdout):  # type: ignore
          self.log.info(line)
  
      returncode = self._sp.wait()
  
      if returncode:
          raise AirflowException(
              f"Cannot execute '{self._sql}' on {self._master} (additional parameters: '{cmd}'). "
              f"Process exit code: {returncode}."
          )
  
file_path: airflow/airflow/providers/apache/spark/hooks/spark_sql.py
imports: from __future__ import annotations
  import subprocess
  from typing import TYPE_CHECKING, Any
  from airflow.exceptions import AirflowException, AirflowNotFoundException
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 6 for calling the SparkSqlHook obj's underlying member method code with example usage: obj.run_query(cmd) without return types