class_docstr: Class used to write data to an assets db.
  
  Parameters
  ----------
  engine : Engine or str
      An SQLAlchemy engine or path to a SQL database.
class_docstr_tok: ["Class","used","to","write","data","to","an","assets","db",".","Parameters","--","--","--","--","--","engine",":","Engine","or","str","An","SQLAlchemy","engine","or","path","to","a","SQL","database","."]
code: def _write_df_to_table(self, tbl, df, txn, chunk_size):
      df = df.copy()
      for column, dtype in df.dtypes.iteritems():
          if dtype.kind == "M":
              df[column] = _dt_to_epoch_ns(df[column])
  
      df.to_sql(
          tbl.name,
          txn.connection,
          index=True,
          index_label=first(tbl.primary_key.columns).name,
          if_exists="append",
          chunksize=chunk_size,
      )
  
imports: from collections import namedtuple
  import re
  import numpy
  import pandas
  import sqlalchemy
  from toolz import first
  from zipline.errors import AssetDBVersionError
  from zipline.assets.asset_db_schema import ASSET_DB_VERSION, asset_db_table_names, asset_router, equities, equity_symbol_mappings, equity_supplementary_mappings, futures_contracts, exchanges, futures_root_symbols, metadata, version_info
  from zipline.utils.compat import ExitStack
  from zipline.utils.preprocess import preprocess
  from zipline.utils.range import from_tuple, intersecting_ranges
  from zipline.utils.sqlite_utils import coerce_string_to_eng
label_desc: Use image node_id 5 for calling the AssetDBWriter obj's underlying member method code with example usage: obj._write_df_to_table(tbl, df, txn, chunk_size) without return types