code: def read_sql_table(
      table_name,
      con,
      index_col,
      divisions=None,
      npartitions=None,
      limits=None,
      columns=None,
      bytes_per_chunk="256 MiB",
      head_rows=5,
      schema=None,
      meta=None,
      engine_kwargs=None,
      **kwargs,
  ):
      """
      Read SQL database table into a DataFrame.
  
      If neither ``divisions`` or ``npartitions`` is given, the memory footprint of the
      first few rows will be determined, and partitions of size ~256MB will
      be used.
  
      Parameters
      ----------
      table_name : str
          Name of SQL table in database.
      con : str
          Full sqlalchemy URI for the database connection
      index_col : str
          Column which becomes the index, and defines the partitioning. Should
          be a indexed column in the SQL server, and any orderable type. If the
          type is number or time, then partition boundaries can be inferred from
          ``npartitions`` or ``bytes_per_chunk``; otherwise must supply explicit
          ``divisions``.
      columns : sequence of str or SqlAlchemy column or None
          Which columns to select; if None, gets all. Note can be a mix of str and SqlAlchemy columns
      schema : str or None
          Pass this to sqlalchemy to select which DB schema to use within the
          URI connection
      divisions: sequence
          Values of the index column to split the table by. If given, this will
          override ``npartitions`` and ``bytes_per_chunk``. The divisions are the value
          boundaries of the index column used to define the partitions. For
          example, ``divisions=list('acegikmoqsuwz')`` could be used to partition
          a string column lexographically into 12 partitions, with the implicit
          assumption that each partition contains similar numbers of records.
      npartitions : int
          Number of partitions, if ``divisions`` is not given. Will split the values
          of the index column linearly between ``limits``, if given, or the column
          max/min. The index column must be numeric or time for this to work
      limits: 2-tuple or None
          Manually give upper and lower range of values for use with ``npartitions``;
          if None, first fetches max/min from the DB. Upper limit, if
          given, is inclusive.
      bytes_per_chunk : str or int
          If both ``divisions`` and ``npartitions`` is None, this is the target size of
          each partition, in bytes
      head_rows : int
          How many rows to load for inferring the data-types, and memory per row
      meta : empty DataFrame or None
          If provided, do not attempt to infer dtypes, but use these, coercing
          all chunks on load
      engine_kwargs : dict or None
          Specific db engine parameters for sqlalchemy
      kwargs : dict
          Additional parameters to pass to `pd.read_sql()`
  
      Returns
      -------
      dask.dataframe
  
      See Also
      --------
      read_sql_query : Read SQL query into a DataFrame.
  
      Examples
      --------
      >>> df = dd.read_sql_table('accounts', 'sqlite:///path/to/bank.db',
      ...                  npartitions=10, index_col='id')  # doctest: +SKIP
      """
      import sqlalchemy as sa
      from sqlalchemy import sql
  
      if "table" in kwargs:
          warnings.warn(
              "The `table` keyword has been replaced by `table_name`. Please use `table_name` instead.",
              DeprecationWarning,
          )
          table_name = kwargs.pop("table")
      if "uri" in kwargs:
          warnings.warn(
              "The `uri` keyword has been replaced by `con`. Please use `con` instead.",
              DeprecationWarning,
          )
          con = kwargs.pop("uri")
  
      if not isinstance(table_name, str):
          raise TypeError(
              "`table_name` must be of type str, not "
              + str(type(table_name))
          )
      if columns is not None:
          for col in columns:
              if not isinstance(col, (sa.Column, str)):
                  raise TypeError(
                      "`columns` must be of type List[str], and cannot contain "
                      + str(type(col))
                  )
  
      if not isinstance(con, str):
          raise TypeError(
              "`con` must be of type str, not "
              + str(type(con))
              + "Note: Dask does not support SQLAlchemy connectables here"
          )
  
      engine_kwargs = {} if engine_kwargs is None else engine_kwargs
      engine = sa.create_engine(con, **engine_kwargs)
      m = sa.MetaData()
      if isinstance(table_name, str):
          table_name = sa.Table(
              table_name, m, autoload_with=engine, schema=schema
          )
      else:
          raise TypeError(
              "`table_name` must be of type str, not "
              + str(type(table_name))
          )
      engine.dispose()
  
      columns = (
          [
              (
                  sa.Column(c, table_name.columns[c].type)
                  if isinstance(c, str)
                  else sa.Column(c.name, c.type)
              )
              for c in columns
          ]
          if columns
          else [sa.Column(c.name, c.type) for c in table_name.columns]
      )
      index = (
          sa.Column(index_col, table_name.columns[index_col].type)
          if isinstance(index_col, str)
          else sa.Column(index_col.name, index_col.type)
      )
  
      if index.name not in [c.name for c in columns]:
          columns.append(index)
  
      query = sql.select(*columns).select_from(table_name)
  
      return read_sql_query(
          sql=query,
          con=con,
          index_col=index,
          divisions=divisions,
          npartitions=npartitions,
          limits=limits,
          bytes_per_chunk=bytes_per_chunk,
          head_rows=head_rows,
          meta=meta,
          engine_kwargs=engine_kwargs,
          **kwargs,
      )
  
file_path: dask/dask/dataframe/io/sql.py
imports: from __future__ import annotations
  import warnings
  import numpy
  import pandas
  from dask.base import compute
  from dask.dataframe import methods
  from dask.dataframe.io.io import from_delayed, from_pandas
  from dask.dataframe.utils import pyarrow_strings_enabled
  from dask.delayed import delayed, tokenize
  from dask.utils import parse_bytes
label_desc: Use image node_id 2 for calling a global function with example usage: read_sql_table(table_name, con, index_col, divisions, npartitions, limits, columns, bytes_per_chunk, head_rows, schema, meta, engine_kwargs) and returns: read_sql_query