Giter Club home page Giter Club logo

grants-etl's Introduction

๐Ÿ”ญ Grants Data cache & ETL Pipeline

For exploring grants data using SQL queries in Postgres

DB schema visualized

Table of Contents

๐Ÿšช Introduction

This is a NodeJS/typescript ETL framework, powered by the Allo indexer data API. This ETL pipeline queries the Allo indexer data API and populates the existing Postgres db in docker (see docker-compose.yml file). Database schema is managed using Prisma (a Typescript ORM).

๐Ÿ Quick start

  • Install Docker. Visit https://www.docker.com/ to install.

  • After Docker installation, open Terminal to this repo location and run:

docker compose up

PGAdmin

  • Once all containers are running and healthy, open http://localhost:5555 to open PGAdmin.

  • Login using default login details:

Email: [email protected]
Password: admin
  • Load and configure your server:
Config Name Value
Host name/address host.docker.internal
Port 5432
Username postgres
Password postgres

PGAdmin add new server PGAdmin server name PGAdmin add server config

Metabase

  • Once all containers are running and healthy, open http://localhost:3000 to open Metabase UI.

  • Login using default login details:

Email: [email protected]
Password: password420

Metabase Dashboard

๐Ÿช„ Run sample query

  • Click on the Query tool (image below) and copy any sample query from ./queries ๐Ÿ˜‰

PGAdmin run new query Metabase run new query

๐Ÿ’ช๐Ÿพ Local Development

You can modify the schema file (located at ./prisma/schema.prisma) as needed. To kick off indexing for a particular chain, you can run:

yarn run etl --chain [chainId]

Currently available chains are:

Chain ChainId
Ethereum Mainnet 1
Optimism Mainnet 10
Fantom Opera 250
Public Goods Network (PGN) 424

For more hands-on use cases like creating a custom ETL pipeline like indexing data from the blockchain via RPC using tools like chainsauce.

๐Ÿ˜Ž Contribute

You can be a cool anon and send in a PR. If you have an SQL query that has helped you and you feel will be helpful to other Anons ๐Ÿ‘ป and explorers ๐Ÿ”ญ, feel free to fork this, add it to ./queries, and send in a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.