class_docstr: Base class for to create DBClients for engines supported by SQLAlchemy.
class_docstr_tok: ["Base","class","for","to","create","DBClients","for","engines","supported","by","SQLAlchemy","."]
docstr: Checks that the query parameters in the URL only include the valid parameters specified.
docstr_tok: ["Checks","that","the","query","parameters","in","the","URL","only","include","the","valid","parameters","specified","."]
code: def validate_query_params(
      url: sqlalchemy.engine.url.URL,
      required_parameters: Set[str],
      optional_parameters: Set[str],
  ) -> None:
      """Checks that the query parameters in the URL only include the valid parameters specified."""
      query_keys = set(url.query.keys())
      errors = []
      if not query_keys.issuperset(required_parameters):
          errors.append(
              f"Missing required parameters {required_parameters - query_keys}"
          )
      if not query_keys.issubset(
          required_parameters.union(optional_parameters)
      ):
          errors.append(
              f"Found extra parameters {query_keys - required_parameters.union(optional_parameters)}"
          )
  
      if errors:
          raise ValueError(
              f"Found errors in the URL: {url}\n" + "\n".join(errors)
          )
  
imports: from __future__ import annotations
  import logging
  import time
  from abc import ABC
  from contextlib import contextmanager
  from typing import Iterator, Mapping, Optional, Sequence, Set, Union
  import pandas
  import sqlalchemy
  from metricflow.dataflow.sql_table import SqlTable
  from metricflow.sql.sql_bind_parameters import SqlBindParameters
  from metricflow.sql_request.sql_request_attributes import SqlJsonTag, SqlRequestTagSet
  from metricflow.test.fixtures.sql_clients.base_sql_client_implementation import BaseSqlClientImplementation
label_desc: Use image node_id 9 for calling the SqlAlchemySqlClient obj's underlying member method code with example usage: obj.validate_query_params(url, required_parameters, optional_parameters) without return types