Schema Update for Ethereum Mainnet Tables: Essential Changes and Actions for Users

ZettaBlock is carrying out schema updates for core tables in ethereum_mainnet database in data lake. Real time database ethereum_mainnet will undergo the same changes shortly after.


The schema update will be performed in a 2-hour maintenance window on Friday, Jan 19 (1-3 pm PST / 4-6 pm EST), during which, user APIs will be migrated to fit the new schema.

Users’ saved queries might not work after the schema update. Please check your saved queries and update them accordingly.

What to expect

  • Customer will observe query changes in the APIs (GraphQL querying should not be affected as the schema of resulting dataset will be kept the same).
  • Customer CU usage might change due to the changes in queries.
  • Tables impacted:
    • ethereum_mainnet.blocks
    • ethereum_mainnet.logs
    • ethereum_mainnet.traces
    • ethereum_mainnet.transactions
    • ethereum_mainnet.erc20_evt_transfer
    • ethereum_mainnet.erc721_evt_transfer
    • ethereum_mainnet.erc1155_evt_transfer_batch
    • ethereum_mainnet.erc1155_evt_transfer_single
    • ethereum_mainnet.contract_creations
    • ethereum_mainnet.eth_transfers (to be renamed as ethereum_mainnet.native_token_transfers)
    • ethereum_mainnet.wallets_first_seen

Summary of changes

  • Table renaming:

    • Table eth_transfers is renamed to native_token_transfers
  • Column changes:

    • Partition column is renamed from **data_creation_date** to **block_date**
    • Columns of type **decimal(p,s)** are unified to **decimal(38,0)**
    • ERC token metadata columns are removed from table erc20_evt_transfer, erc721_evt_transfer, erc1155_evt_transfer_batch, and erc1155_evt_transfer_single. As a substitute, we recommend users to use table **erc20_tokens** and **nft_tokens** tables to get token metadata.

    Example queries:

-- Get ERC20 token information for transfers in table erc20_evt_transfer
SELECT erc.*,, m.symbol, m.decimals
FROM ethereum_mainnet.erc20_evt_transfer erc
LEFT JOIN ethereum_mainnet.erc20_tokens m ON erc.contract_address = m.contract_address
-- Get NFT token information for transfers in table erc721_evt_transfer, erc1155_evt_transfer_single, and erc1155_evt_transfer_batch
SELECT erc.*,, m.symbol, m.decimals
FROM ethereum_mainnet.erc721_evt_transfer erc
LEFT JOIN ethereum_mainnet.nft_tokens m ON erc.contract_address = m.contract_address

If you have any questions or troubles that occur during this migration, please let us know in our Discord server.