def METHOD_NAME(mf_test_session_state: MetricFlowTestSessionState, sql_client: SqlClient) -> None:  # noqa: D
    test_table = SqlTable(schema_name=mf_test_session_state.mf_system_schema, table_name=_random_table())
    stmt = f"CREATE TABLE {test_table.sql} AS SELECT 1 AS foo"
    sql_client.dry_run(stmt)
    with pytest.raises(expected_exception=Exception) as excinfo:
        sql_client.execute(stmt=f"SELECT * FROM {test_table.sql}")
    exception_message = repr(excinfo.value)
    match = (
        test_table.table_name
        if sql_client.sql_engine_type is not SqlEngine.SNOWFLAKE
        else str.upper(test_table.table_name)
    )
    assert (
        exception_message.find(f"{match}") != -1
    ), f"Expected an exception about table {match} not found, but got `{exception_message}`"