Indexing Status
Performing SQL queries on the ENS Unigraph requires that you have the unigraph plugin activated in your ENSNode instance. Learn more
Read the indexing status snapshot for an ENSIndexer instance from the shared ensnode.metadata table. See Connect for setup.
It is the name of an ENSNode Schema, which is a database schema within an ENSDb instance, used to store metadata about ENSDb Writer instances that have ever connected to the ENSDb instance. There can be only one ENSNode Schema per
ENSDb instance, and its name is always
ensnode.
SQL
-- Indexing status snapshot for the `ensindexer_0` ENSIndexer SchemaSELECT value -> 'indexingStatus' as indexing_status_snapshotFROM ensnode.metadataWHERE ens_indexer_schema_name = 'ensindexer_0'AND key = 'indexing_metadata_context'; Output
| # | indexing_status_snapshot |
|---|---|
| 1 | |
Output matches a result snapshot; live output depends on your ENSNode instance.
See how to connect to ENSDb and get access to the
ensDb query builder and ensIndexerSchema
schema definition in the Connect section if you haven't already.
TypeScript
import { IndexingMetadataContextStatusCodes } from "@ensnode/ensdb-sdk";
const indexingMetadataContext = await ensDbReader.getIndexingMetadataContext();if (indexingMetadataContext.statusCode === IndexingMetadataContextStatusCodes.Initialized) { const { indexingStatus } = indexingMetadataContext; console.log({ indexingStatus });} Output
| # | indexingStatus |
|---|---|
| 1 | |
Output matches a result snapshot; live output depends on your ENSNode instance.