{"id":13631890,"url":"https://github.com/blockchain-etl/polygon-etl","last_synced_at":"2025-04-05T14:08:11.054Z","repository":{"id":37863959,"uuid":"345555735","full_name":"blockchain-etl/polygon-etl","owner":"blockchain-etl","description":"ETL (extract, transform and load) tools for ingesting Polygon blockchain data to Google BigQuery and Pub/Sub","archived":false,"fork":false,"pushed_at":"2024-04-12T06:18:54.000Z","size":1518,"stargazers_count":96,"open_issues_count":11,"forks_count":74,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-05-16T12:34:29.950Z","etag":null,"topics":["airflow","bigquery","cryptocurrency","data-engineering","etl","gcp","matic-network","maticnetwork","polygon"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blockchain-etl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-08T06:39:47.000Z","updated_at":"2024-06-11T06:55:53.992Z","dependencies_parsed_at":"2024-06-11T06:55:52.352Z","dependency_job_id":"65db6722-1fb3-45fa-a069-fdeeb13526de","html_url":"https://github.com/blockchain-etl/polygon-etl","commit_stats":{"total_commits":294,"total_committers":25,"mean_commits":11.76,"dds":0.7074829931972789,"last_synced_commit":"7b1384947a18833b51888260d4267cb24d292412"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockchain-etl%2Fpolygon-etl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockchain-etl%2Fpolygon-etl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockchain-etl%2Fpolygon-etl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockchain-etl%2Fpolygon-etl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockchain-etl","download_url":"https://codeload.github.com/blockchain-etl/polygon-etl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345853,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airflow","bigquery","cryptocurrency","data-engineering","etl","gcp","matic-network","maticnetwork","polygon"],"created_at":"2024-08-01T22:02:42.904Z","updated_at":"2025-04-05T14:08:10.992Z","avatar_url":"https://github.com/blockchain-etl.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Polygon-etl\n\n## Overview\n\nPolygon ETL allows you to setup an ETL pipeline in Google Cloud Platform for ingesting Polygon blockchain data\ninto BigQuery and Pub/Sub. It comes with [CLI tools](/cli) for exporting Polygon data into convenient formats like CSVs and relational databases.\n\n\n## Status Update (2024-08-29)\n\n### This repo\n- Nansen has decided to step back from its role as major contributor to this repo.\n- Nansen would like to thank all contributors to this repo, with best wishes for the future.\n\n### Raw data\n- BigQuery dataset `public-data-finance.crypto_polygon` has not been updated since 2024-09-01.\n- Both batch loading and streaming to this dataset are currently disabled in Polygon's GCP infra.\n- Nansen are no longer be maintaining this dataset; it's up to Polygon what happens next.\n\n### Parsed data\n- This repo's [table_definitions folder](./airflow/dags/resources/stages/parse/table_definitions) is now archived. Please do not add table definitions there!\n- Nansen continues to batch load daily to BigQuery datasets `blockchain-etl.polygon_*`.\n- Nansen will be maintaining this dataset for the foreseeable future.\n- If you wish to contribute table definitions, please raise PRs in [nansen-ai/evmchain-etl-table-definitions](https://github.com/nansen-ai/evmchain-etl-table-definitions).\n\n\n## Architecture\n\n![polygon_etl_architecture.svg](polygon_etl_architecture.svg)\n\n1. The nodes are run in a Kubernetes cluster.\n\n2. [Airflow DAGs](https://airflow.apache.org/) export and load Polygon data to BigQuery daily.\n   Refer to [Polygon ETL Airflow](/airflow) for deployment instructions.\n\n3. Polygon data is polled periodically from the nodes and pushed to Google Pub/Sub.\n   Refer to [Polygon ETL Streaming](/streaming) for deployment instructions.\n\n4. Polygon data is pulled from Pub/Sub, transformed and streamed to BigQuery.\n   Refer to [Polygon ETL Dataflow](/dataflow) for deployment instructions.\n\n## Setting Up\n\n1. Follow the instructions in [Polygon ETL Airflow](/airflow) to deploy a Cloud Composer cluster for\n   exporting and loading historical Polygon data. It may take several days for the export DAG to catch up. During this\n   time \"load\" and \"verify_streaming\" DAGs will fail.\n\n2. Follow the instructions in [Polygon ETL Streaming](/streaming) to deploy the Streamer component. For the value in\n   `last_synced_block.txt` specify the last block number of the previous day. You can query it in BigQuery:\n   `SELECT number FROM crypto_polygon.blocks ORDER BY number DESC LIMIT 1`.\n\n3. Follow the instructions in [Polygon ETL Dataflow](/dataflow) to deploy the Dataflow component. Monitor\n   \"verify_streaming\" DAG in Airflow console, once the Dataflow job catches up the latest block, the DAG will succeed.\n\n## Code quality\n\nOver time, we intend to format python files in this repo using isort and black.\nAt the moment, we are *only formatting any changed or added files*\n\nWe have not implemented any sort of automation (e.g. pre-commit), but a requirements_dev.txt is provided for contributors to use.\n\n## Testing\n\nVarious tests are implemented (`airflow/tests`, `cli/tests` and `./tests`).\nAs part of an effort towards consistency, they all source the same requirements_test.txt.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockchain-etl%2Fpolygon-etl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockchain-etl%2Fpolygon-etl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockchain-etl%2Fpolygon-etl/lists"}