code: def test_dry_run_of_bad_query_raises_exception(
      sql_client: SqlClient,
  ) -> None:  # noqa: D
      bad_stmt = "SELECT bad_col"
      # Tests that a bad query raises an exception. Different engines may raise different exceptions e.g.
      # ProgrammingError, OperationalError, google.api_core.exceptions.BadRequest, etc.
      with pytest.raises(Exception, match=r"(?i)bad_col"):
          sql_client.dry_run(bad_stmt)
  
imports: from __future__ import annotations
  import logging
  from typing import Set, Union
  import pandas
  import pytest
  from metricflow.dataflow.sql_table import SqlTable
  from metricflow.protocols.sql_client import SqlClient, SqlEngine
  from metricflow.random_id import random_id
  from metricflow.sql.sql_bind_parameters import SqlBindParameters
  from metricflow.test.compare_df import assert_dataframes_equal
  from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState
  from metricflow.test.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods
label_desc: Use image node_id 10 for calling a global function with example usage: test_dry_run_of_bad_query_raises_exception(sql_client) without return types