How to Query Blockchain Data

Avatar of Kirubakumaresh Rajendran
Kirubakumaresh Rajendran

August 18, 2022 · 2 min read

There are thousands of dapps running on the Ethereum network. Their backend logic and data are stored and executed in the blockchain.

Dapps on Ethereum

Decentralized applications running on Ethereum network

Who owns the data?

No one but everyone can access the data.

How does anyone get access to the data?

Every (archive) node in the Ethereum network contains a complete copy of the blockchain data. All we have to do is download and run the Ethereum client. The entire blockchain data would be downloaded to the machine.

Although this gives us access to the data, the raw data is not stored in a format suitable for analytical queries. We would have to extract data from the node, transform it, and then load it in a queryable format.

Blockchain-ETL is a set of open source scripts that allow us to transform and load data into a relational database so that we can query it using SQL.

Host blockchain data

DIY blockchain data hosting

Although the above option is ideal for anyone who wants to host their own blockchain database, it is the hardest to get started since it requires

🥱 Setting up and maintaining an archive node.

😫 Managing the ETL process and the database service.

There are providers who take away the complexity of the above process and allow us to query data directly using SQL or GraphQL.

Blockchain data providers

Blockchain data providers

If you're interested in learning more about blockchain analytics, sign up to receive notifications about upcoming articles and projects.

© 2022 TwigBlock All rights reserved. Credits.