class_docstr: Save events into an SQL database.
  
  All events will be stored in a table called `events`.
docstr: Initializes `SQLBrokerEvent`.
docstr_tok: ["Initializes","`","SQLBrokerEvent","`","."]
code: def __init__(
      self,
      dialect: Text = "sqlite",
      host: Optional[Text] = None,
      port: Optional[int] = None,
      db: Text = "events.db",
      username: Optional[Text] = None,
      password: Optional[Text] = None,
  ) -> None:
      """Initializes `SQLBrokerEvent`."""
      from rasa.core.tracker_store import SQLTrackerStore
      import sqlalchemy.orm
  
      engine_url = SQLTrackerStore.get_db_url(
          dialect, host, port, db, username, password
      )
  
      logger.debug(
          f"SQLEventBroker: Connecting to database: '{engine_url}'."
      )
  
      self.engine = sqlalchemy.create_engine(engine_url)
      self.Base.metadata.create_all(self.engine)
      self.sessionmaker = sqlalchemy.orm.sessionmaker(bind=self.engine)
  
file_path: rasa/rasa/core/brokers/sql.py
imports: import contextlib
  import json
  import logging
  from asyncio import AbstractEventLoop
  from typing import Any, Dict, Optional, Text, Generator
  from sqlalchemy.orm import Session
  from sqlalchemy.ext.declarative import declarative_base, DeclarativeMeta
  from sqlalchemy import Column, Integer, String
  from sqlalchemy import Text
  from rasa.core.brokers.broker import EventBroker
  from rasa.utils.endpoints import EndpointConfig
label_desc: Use image node_id 1 to create a new SQLEventBroker object from inherited base classes: EventBroker with example: obj = SQLEventBroker(dialect, host, port, db, username, password)