class_docstr: Hook to interact with Databricks SQL.
  
  :param databricks_conn_id: Reference to the
      :ref:`Databricks connection <howto/connection:databricks>`.
  :param http_path: Optional string specifying HTTP path of Databricks SQL Endpoint or cluster.
      If not specified, it should be either specified in the Databricks connection's extra parameters,
      or ``sql_endpoint_name`` must be specified.
  :param sql_endpoint_name: Optional name of Databricks SQL Endpoint. If not specified, ``http_path``
      must be provided as described above.
  :param session_configuration: An optional dictionary of Spark session parameters. Defaults to None.
      If not specified, it could be specified in the Databricks connection's extra parameters.
  :param http_headers: An optional list of (k, v) pairs that will be set as HTTP headers
      on every request
  :param catalog: An optional initial catalog to use. Requires DBR version 9.0+
  :param schema: An optional initial schema to use. Requires DBR version 9.0+
  :param return_tuple: Return a ``namedtuple`` object instead of a ``databricks.sql.Row`` object. Default
      to False. In a future release of the provider, this will become True by default. This parameter
      ensures backward-compatibility during the transition phase to common tuple objects for all hooks based
      on DbApiHook. This flag will also be removed in a future release.
  :param kwargs: Additional parameters internal to Databricks SQL Connector parameters
docstr: Transform the databricks Row objects into namedtuple.
docstr_tok: ["Transform","the","databricks","Row","objects","into","namedtuple","."]
code: def _make_common_data_structure(
      self, result: Sequence[Row] | Row
  ) -> list[tuple] | tuple:
      """Transform the databricks Row objects into namedtuple."""
      # Below ignored lines respect namedtuple docstring, but mypy do not support dynamically
      # instantiated namedtuple, and will never do: https://github.com/python/mypy/issues/848
      if isinstance(result, list):
          rows: list[Row] = result
          if not rows:
              return []
          rows_fields = rows[0].__fields__
          rows_object = namedtuple("Row", rows_fields)  # type: ignore[misc]
          return cast(List[tuple], [rows_object(*row) for row in rows])
      else:
          row: Row = result
          row_fields = row.__fields__
          row_object = namedtuple("Row", row_fields)  # type: ignore[misc]
          return cast(tuple, row_object(*row))
  
imports: from __future__ import annotations
  import warnings
  from collections import namedtuple
  from contextlib import closing
  from copy import copy
  from typing import TYPE_CHECKING, Any, Callable, Iterable, List, Mapping, Sequence, TypeVar, cast, overload
  from databricks import sql
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.common.sql.hooks.sql import DbApiHook, return_single_query_results
  from airflow.providers.databricks.hooks.databricks_base import BaseDatabricksHook
label_desc: Use image node_id 8 for calling the DatabricksSqlHook obj's underlying member method code with example usage: obj._make_common_data_structure(result) and returns: cast, cast, list