Internal tables
This page describes the internal tables used by DipDup. They are created automatically and are not intended to be modified by the user. However, they can be useful for external monitoring and debugging.
table | description |
---|---|
dipdup_schema | Information about database schema in use including hash to detect changes that require reindexing. |
dipdup_head | The latest block received by index datasources in realtime state. Indicates that underlying datasource is ok. |
dipdup_index | Everything about specific indexes from config: status, current level, template and it's values if applicable. |
dipdup_contract | Info about contracts used by all indexes, including ones added in runtime. |
dipdup_model_update | Service table to store model diffs for database rollback. Configured by advanced.rollback_depth |
dipdup_meta | Arbitrary key-value storage for DipDup internal use. Survives reindexing. You can use it too, but don't touch keys with dipdup_ prefix. |
dipdup_contract_metadata | See Metadata interface page |
dipdup_token_metadata | See Metadata interface page |
See dipdup.models
module for exact table definitions.
If you want to use these tables in monitoring, here are some SQL snippets to help you get started:
-- Time since last block received by index datasources
SELECT name, NOW() - timestamp FROM dipdup_head;
-- Index statuses
SELECT name, status FROM dipdup_index;
-- Get last reindex time
SELECT created_at FROM dipdup_schema WHERE name = 'public';
Help and tips -> Join our Discord
Ideas or suggestions -> Issue Tracker