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","."]
docstr: Write asset metadata to a sqlite database.
  
  Parameters
  ----------
  equities : pd.DataFrame, optional
      The equity metadata. The columns for this dataframe are:
  
        symbol : str
            The ticker symbol for this equity.
        asset_name : str
            The full name for this asset.
        start_date : datetime
            The date when this asset was created.
        end_date : datetime, optional
            The last date we have trade data for this asset.
        first_traded : datetime, optional
            The first date we have trade data for this asset.
        auto_close_date : datetime, optional
            The date on which to close any positions in this asset.
        exchange : str
            The exchange where this asset is traded.
  
      The index of this dataframe should contain the sids.
  futures : pd.DataFrame, optional
      The future contract metadata. The columns for this dataframe are:
  
        symbol : str
            The ticker symbol for this futures contract.
        root_symbol : str
            The root symbol, or the symbol with the expiration stripped
            out.
        asset_name : str
            The full name for this asset.
        start_date : datetime, optional
            The date when this asset was created.
        end_date : datetime, optional
            The last date we have trade data for this asset.
        first_traded : datetime, optional
            The first date we have trade data for this asset.
        exchange : str
            The exchange where this asset is traded.
        notice_date : datetime
            The date when the owner of the contract may be forced
            to take physical delivery of the contract's asset.
        expiration_date : datetime
            The date when the contract expires.
        auto_close_date : datetime
            The date when the broker will automatically close any
            positions in this contract.
        tick_size : float
            The minimum price movement of the contract.
        multiplier: float
            The amount of the underlying asset represented by this
            contract.
  exchanges : pd.DataFrame, optional
      The exchanges where assets can be traded. The columns of this
      dataframe are:
  
        exchange : str
            The full name of the exchange.
        canonical_name : str
            The canonical name of the exchange.
        country_code : str
            The ISO 3166 alpha-2 country code of the exchange.
  root_symbols : pd.DataFrame, optional
      The root symbols for the futures contracts. The columns for this
      dataframe are:
  
        root_symbol : str
            The root symbol name.
        root_symbol_id : int
            The unique id for this root symbol.
        sector : string, optional
            The sector of this root symbol.
        description : string, optional
            A short description of this root symbol.
        exchange : str
            The exchange where this root symbol is traded.
  equity_supplementary_mappings : pd.DataFrame, optional
      Additional mappings from values of abitrary type to assets.
  chunk_size : int, optional
      The amount of rows to write to the SQLite table at once.
      This defaults to the default number of bind params in sqlite.
      If you have compiled sqlite3 with more bind or less params you may
      want to pass that value here.
  
  See Also
  --------
  zipline.assets.asset_finder
docstr_tok: ["Write","asset","metadata","to","a","sqlite","database",".","Parameters","--","--","--","--","--","equities",":","pd.DataFrame",",","optional","The","equity","metadata",".","The","columns","for","this","dataframe","are",":","symbol",":","str","The","ticker","symbol","for","this","equity",".","asset_name",":","str","The","full","name","for","this","asset",".","start_date",":","datetime","The","date","when","this","asset","was","created",".","end_date",":","datetime",",","optional","The","last","date","we","have","trade","data","for","this","asset",".","first_traded",":","datetime",",","optional","The","first","date","we","have","trade","data","for","this","asset",".","auto_close_date",":","datetime",",","optional","The","date","on","which","to","close","any","positions","in","this","asset",".","exchange",":","str","The","exchange","where","this","asset","is","traded",".","The","index","of","this","dataframe","should","contain","the","sids",".","futures",":","pd.DataFrame",",","optional","The","future","contract","metadata",".","The","columns","for","this","dataframe","are",":","symbol",":","str","The","ticker","symbol","for","this","futures","contract",".","root_symbol",":","str","The","root","symbol",",","or","the","symbol","with","the","expiration","stripped","out",".","asset_name",":","str","The","full","name","for","this","asset",".","start_date",":","datetime",",","optional","The","date","when","this","asset","was","created",".","end_date",":","datetime",",","optional","The","last","date","we","have","trade","data","for","this","asset",".","first_traded",":","datetime",",","optional","The","first","date","we","have","trade","data","for","this","asset",".","exchange",":","str","The","exchange","where","this","asset","is","traded",".","notice_date",":","datetime","The","date","when","the","owner","of","the","contract","may","be","forced","to","take","physical","delivery","of","the","contract","'s","asset",".","expiration_date",":","datetime","The","date","when","the","contract","expires",".","auto_close_date",":","datetime","The","date","when","the","broker","will","automatically","close","any","positions","in","this","contract",".","tick_size",":","float","The","minimum","price","movement","of","the","contract",".","multiplier",":","float","The","amount","of","the","underlying","asset","represented","by","this","contract",".","exchanges",":","pd.DataFrame",",","optional","The","exchanges","where","assets","can","be","traded",".","The","columns","of","this","dataframe","are",":","exchange",":","str","The","full","name","of","the","exchange",".","canonical_name",":","str","The","canonical","name","of","the","exchange",".","country_code",":","str","The","ISO","3166","alpha-2","country","code","of","the","exchange",".","root_symbols",":","pd.DataFrame",",","optional","The","root","symbols","for","the","futures","contracts",".","The","columns","for","this","dataframe","are",":","root_symbol",":","str","The","root","symbol","name",".","root_symbol_id",":","int","The","unique","id","for","this","root","symbol",".","sector",":","string",",","optional","The","sector","of","this","root","symbol",".","description",":","string",",","optional","A","short","description","of","this","root","symbol",".","exchange",":","str","The","exchange","where","this","root","symbol","is","traded",".","equity_supplementary_mappings",":","pd.DataFrame",",","optional","Additional","mappings","from","values","of","abitrary","type","to","assets",".","chunk_size",":","int",",","optional","The","amount","of","rows","to","write","to","the","SQLite","table","at","once",".","This","defaults","to","the","default","number","of","bind","params","in","sqlite",".","If","you","have","compiled","sqlite3","with","more","bind","or","less","params","you","may","want","to","pass","that","value","here",".","See","Also","--","--","--","--","zipline.assets.asset_finder"]
code: def write(
      self,
      equities=None,
      futures=None,
      exchanges=None,
      root_symbols=None,
      equity_supplementary_mappings=None,
      chunk_size=DEFAULT_CHUNK_SIZE,
  ):
      """Write asset metadata to a sqlite database.
  
      Parameters
      ----------
      equities : pd.DataFrame, optional
          The equity metadata. The columns for this dataframe are:
  
            symbol : str
                The ticker symbol for this equity.
            asset_name : str
                The full name for this asset.
            start_date : datetime
                The date when this asset was created.
            end_date : datetime, optional
                The last date we have trade data for this asset.
            first_traded : datetime, optional
                The first date we have trade data for this asset.
            auto_close_date : datetime, optional
                The date on which to close any positions in this asset.
            exchange : str
                The exchange where this asset is traded.
  
          The index of this dataframe should contain the sids.
      futures : pd.DataFrame, optional
          The future contract metadata. The columns for this dataframe are:
  
            symbol : str
                The ticker symbol for this futures contract.
            root_symbol : str
                The root symbol, or the symbol with the expiration stripped
                out.
            asset_name : str
                The full name for this asset.
            start_date : datetime, optional
                The date when this asset was created.
            end_date : datetime, optional
                The last date we have trade data for this asset.
            first_traded : datetime, optional
                The first date we have trade data for this asset.
            exchange : str
                The exchange where this asset is traded.
            notice_date : datetime
                The date when the owner of the contract may be forced
                to take physical delivery of the contract's asset.
            expiration_date : datetime
                The date when the contract expires.
            auto_close_date : datetime
                The date when the broker will automatically close any
                positions in this contract.
            tick_size : float
                The minimum price movement of the contract.
            multiplier: float
                The amount of the underlying asset represented by this
                contract.
      exchanges : pd.DataFrame, optional
          The exchanges where assets can be traded. The columns of this
          dataframe are:
  
            exchange : str
                The full name of the exchange.
            canonical_name : str
                The canonical name of the exchange.
            country_code : str
                The ISO 3166 alpha-2 country code of the exchange.
      root_symbols : pd.DataFrame, optional
          The root symbols for the futures contracts. The columns for this
          dataframe are:
  
            root_symbol : str
                The root symbol name.
            root_symbol_id : int
                The unique id for this root symbol.
            sector : string, optional
                The sector of this root symbol.
            description : string, optional
                A short description of this root symbol.
            exchange : str
                The exchange where this root symbol is traded.
      equity_supplementary_mappings : pd.DataFrame, optional
          Additional mappings from values of abitrary type to assets.
      chunk_size : int, optional
          The amount of rows to write to the SQLite table at once.
          This defaults to the default number of bind params in sqlite.
          If you have compiled sqlite3 with more bind or less params you may
          want to pass that value here.
  
      See Also
      --------
      zipline.assets.asset_finder
      """
      if exchanges is None:
          exchange_names = [
              df["exchange"]
              for df in (equities, futures, root_symbols)
              if df is not None
          ]
          if exchange_names:
              exchanges = pd.DataFrame(
                  {
                      "exchange": pd.concat(exchange_names).unique(),
                  }
              )
  
      data = self._load_data(
          equities if equities is not None else pd.DataFrame(),
          futures if futures is not None else pd.DataFrame(),
          exchanges if exchanges is not None else pd.DataFrame(),
          root_symbols if root_symbols is not None else pd.DataFrame(),
          (
              equity_supplementary_mappings
              if equity_supplementary_mappings is not None
              else pd.DataFrame()
          ),
      )
      self._real_write(
          equities=data.equities,
          equity_symbol_mappings=data.equities_mappings,
          equity_supplementary_mappings=data.equity_supplementary_mappings,
          futures=data.futures,
          root_symbols=data.root_symbols,
          exchanges=data.exchanges,
          chunk_size=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 4 for calling the AssetDBWriter obj's underlying member method code with example usage: obj.write(equities, futures, exchanges, root_symbols, equity_supplementary_mappings, chunk_size) without return types