Fetch all transactions from the XRP ledger
This code allows you to fetc all transactions from the XRP ledger and insert them into Google BigQuery.
The data is already READY TO USE
The data is already available in a PUBLIC dataset at Google BigQuery in:
So a working sample query with some stats would be:
SELECT COUNT(1) as TxCount, MIN(LedgerIndex) as MinLedger, MAX(LedgerIndex) as MaxLedger, COUNT(DISTINCT LedgerIndex) as LedgersWithTxCount FROM xrpledgerdata.fullhistory.transactions
Starting Sept. 27 2018 the dataset will be backfilled from a full history rippled node. Once up to date, I'll run a service that will add all new transactions to the dataset as well.
Run and insert into your own Google BigQuery project
If you want to insert the data in your own BigQuery project, download your credentials (JSON) from the Google Admin Console, and export the path to your credentials file:
More information: https://cloud.google.com/docs/authentication/getting-started
schema.js(line 1-3) to point to your own projectId, dataset and table.
WARNING! If an existing table exists, the table, schema and data will be REMOVED!
You can invoke the script from a node enabled environment by setting these environment variables:
NODE: the rippled node (
wss://...) to connect to, default: wss://s2.ripple.com
LEDGER: the ledger index to start fetching transactions from, default: 32570