class_docstr: SQL connectors are used to connect to SQL databases in different dialects.
class_docstr_tok: ["SQL","connectors","are","used","to","connect","to","SQL","databases","in","different","dialects","."]
docstr: Initialize Database Connection
  
  Args:
      config (SQLConnectorConfig): Configurations to load database
docstr_tok: ["Initialize","Database","Connection","Args",":","config","(","SQLConnectorConfig",")",":","Configurations","to","load","database"]
code: def _init_connection(self, config: SQLConnectorConfig):
      """
      Initialize Database Connection
  
      Args:
          config (SQLConnectorConfig): Configurations to load database
  
      """
  
      if config.driver:
          self._engine = create_engine(
              f"{config.dialect}+{config.driver}://{config.username}:{config.password}"
              f"@{config.host}:{str(config.port)}/{config.database}"
          )
      else:
          self._engine = create_engine(
              f"{config.dialect}://{config.username}:{config.password}@{config.host}"
              f":{str(config.port)}/{config.database}"
          )
  
      self._connection = self._engine.connect()
  
imports: import re
  import os
  import pandas
  from pandasai.exceptions import MaliciousQueryError
  from .base import BaseConnector, SQLConnectorConfig, SqliteConnectorConfig
  from .base import BaseConnectorConfig
  from sqlalchemy import create_engine, text, select, asc
  from sqlalchemy.engine import Connection
  from functools import cached_property, cache
  import hashlib
  from ..helpers.path import find_project_root
  from ..constants import DEFAULT_FILE_PERMISSIONS
  from typing import Union
  import time
label_desc: Use image node_id 3 for calling the SQLConnector obj's underlying member method code with example usage: obj._init_connection(config) without return types