code: def __init__(
      self,
      dataset: Dataset,
      name: str,
      con: Union[
          str,
          "sqlalchemy.engine.Connection",
          "sqlalchemy.engine.Engine",
          "sqlite3.Connection",
      ],
      batch_size: Optional[int] = None,
      num_proc: Optional[int] = None,
      **to_sql_kwargs,
  ):
      if num_proc is not None and num_proc <= 0:
          raise ValueError(
              f"num_proc {num_proc} must be an integer > 0."
          )
  
      self.dataset = dataset
      self.name = name
      self.con = con
      self.batch_size = (
          batch_size if batch_size else config.DEFAULT_MAX_BATCH_SIZE
      )
      self.num_proc = num_proc
      self.to_sql_kwargs = to_sql_kwargs
  
file_path: datasets/src/datasets/io/sql.py
imports: import multiprocessing
  from typing import TYPE_CHECKING, Optional, Union
  from ..None import Dataset, Features, config
  from ..formatting import query_table
  from ..packaged_modules.sql.sql import Sql
  from ..utils import tqdm
  from .abc import AbstractDatasetInputStream
label_desc: Use image node_id 1 to create a new SqlDatasetWriter object  with example: obj = SqlDatasetWriter(dataset, name, con, batch_size, num_proc)