class_docstr: Hook for AnalyticDB MySQL Spark through the REST API.
  
  :param adb_spark_conn_id: The Airflow connection used for AnalyticDB MySQL Spark credentials.
  :param region: AnalyticDB MySQL region you want to submit spark application.
class_docstr_tok: ["Hook","for","AnalyticDB","MySQL","Spark","through","the","REST","API",".",":","param","adb_spark_conn_id",":","The","Airflow","connection","used","for","AnalyticDB","MySQL","Spark","credentials",".",":","param","region",":","AnalyticDB","MySQL","region","you","want","to","submit","spark","application","."]
docstr: Perform request to submit spark sql.
  
  :param cluster_id: The cluster ID of AnalyticDB MySQL 3.0 Data Lakehouse.
  :param rg_name: The name of resource group in AnalyticDB MySQL 3.0 Data Lakehouse cluster.
docstr_tok: ["Perform","request","to","submit","spark","sql",".",":","param","cluster_id",":","The","cluster","ID","of","AnalyticDB","MySQL","3.0","Data","Lakehouse",".",":","param","rg_name",":","The","name","of","resource","group","in","AnalyticDB","MySQL","3.0","Data","Lakehouse","cluster","."]
code: def submit_spark_sql(
      self, cluster_id: str, rg_name: str, *args: Any, **kwargs: Any
  ) -> SubmitSparkAppResponse:
      """
      Perform request to submit spark sql.
  
      :param cluster_id: The cluster ID of AnalyticDB MySQL 3.0 Data Lakehouse.
      :param rg_name: The name of resource group in AnalyticDB MySQL 3.0 Data Lakehouse cluster.
      """
      self.log.info("Submitting Spark SQL")
      request = SubmitSparkAppRequest(
          dbcluster_id=cluster_id,
          resource_group_name=rg_name,
          data=self.build_submit_sql_data(*args, **kwargs),
          app_type="SQL",
      )
      try:
          return self.get_adb_spark_client().submit_spark_app(request)
      except Exception as e:
          self.log.error(e)
          raise AirflowException("Errors when submit spark sql") from e
  
imports: from __future__ import annotations
  import json
  from enum import Enum
  from typing import Any, Sequence
  from alibabacloud_adb20211201.client import Client
  from alibabacloud_adb20211201.models import GetSparkAppLogRequest, GetSparkAppStateRequest, GetSparkAppWebUiAddressRequest, KillSparkAppRequest, SubmitSparkAppRequest, SubmitSparkAppResponse
  from alibabacloud_tea_openapi.models import Config
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.utils.log.logging_mixin import LoggingMixin
label_desc: Use image node_id 3 for calling the AnalyticDBSparkHook obj's underlying member method code with example usage: obj.submit_spark_sql(cluster_id, rg_name) and returns: self