Skip to content

Add Bitcoin blockchain in BigQuery dataset - #86

Merged
0xB10C merged 1 commit into
bitcoin-data:mainfrom
b10claude:add-bigquery-crypto-bitcoin
Nov 5, 2026
Merged

0xB10C merged 1 commit into
bitcoin-data:mainfrom
b10claude:add-bigquery-crypto-bitcoin

Conversation

@b10claude

Copy link
Copy Markdown

Adds datasets/bigquery-crypto-bitcoin.toml.

Sources

Every claim in the entry, and what backs it.

The dataset id, the tables and the views

  • bigquery-public-data.crypto_bitcoin is named in Google's own announcement,
    "Introducing six new cryptocurrencies in BigQuery Public Datasets—and how to
    analyze them", by Allen Day (Google Cloud) and Evgeny Medvedev (author of
    Blockchain ETL), 6 February 2019. The same post names inputs, outputs and
    transactions, and the "views that map all blockchain datasets to a
    double-entry book data structure".
  • The field lists come from the loader's own schema files, not from a blog post:
    dags/resources/stages/enrich/schemas/blocks.json and transactions.json in
    blockchain-etl/bitcoin-etl-airflow.
    • blocks: hash, size, stripped_size, weight, number, version, merkle_root,
      timestamp, timestamp_month, nonce, bits, coinbase_param, transaction_count.
    • transactions: hash, size, virtual_size, version, lock_time, block_hash,
      block_number, block_timestamp, block_timestamp_month, input_count,
      output_count, input_value, output_value, is_coinbase, fee, and repeated
      inputs and outputs records.
    • Each nested input carries index, spent_transaction_hash,
      spent_output_index, script_asm, script_hex, sequence,
      required_signatures, type, repeated addresses and value; each output the
      same minus the spend fields. That is what the entry means by "nested
      alongside their addresses, script, type and value".
  • inputs and outputs are views over the transactions table, not separate
    tables: dags/bitcoinetl/build_load_dag.py creates them with
    add_create_view_tasks('inputs', ...) and ('outputs', ...), while the
    tables it loads are blocks and transactions. Hence "two tables ... plus
    views that flatten them".

Where it comes from

  • The same file documents the destination datasets crypto_{chain},
    crypto_{chain}_raw and crypto_{chain}_temp, so crypto_bitcoin is the
    published one.
  • blockchain-etl/bitcoin-etl is the extraction code, MIT per GitHub's licence
    detection, and reads from a Bitcoin node's JSON-RPC interface. The Airflow
    DAGs in bitcoin-etl-airflow run the export and load.

Access and cost

  • https://docs.cloud.google.com/bigquery/public-data: a public dataset is
    "stored in BigQuery and made available to the general public through the
    Google Cloud Public Dataset Program", Google pays the storage, the user pays
    only for queries, and "the first 1 TB per month is free". That is the basis
    for the caveat that querying needs a Google Cloud project.

Licence, and what I could not verify

  • No licence statement exists in any Google source I could read: not the 2019
    announcement, not the 2018 "Bitcoin in BigQuery" post, not the public
    datasets documentation. The Cloud Marketplace listing and the Kaggle mirror
    both refuse automated requests, so I did not read either.
  • I have seen the claim that the Kaggle mirror is marked CC0, but only
    second-hand, so the entry does not state it. The licence field says
    "Not specified" and names the MIT extraction code, matching how
    btcnodes-io-snapshots handles the same situation.
  • A reviewer who can open the Marketplace listing in a browser should replace
    the licence field with whatever Google states there.

Two judgement calls for the maintainer

  • format: the data is BigQuery tables, and none of the allowed values in
    FORMATS describes that. The entry lists csv, jsonl and parquet, which
    are the formats BigQuery exports query results in (Avro too, which is not in
    the enum). If you would rather add a value such as bigquery or sql-table,
    that is a separate change to build.py plus this one line, and I will open
    it.
  • There is no download link, because the dataset is not downloadable: it is
    queried in place. The links give the Marketplace listing, the extraction
    code, the schemas and the access terms instead.

Not verified

  • I did not query the dataset. BigQuery's API needs credentials, so the table
    and field lists come from the loader repository that builds the public
    dataset, which is the closest primary source available from here.
  • Whether the pipeline is currently running, and how far behind the chain tip
    the tables are. The description states no cadence, per the timeless rule.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EQFKPv3mB1J6LFakJnjNsd

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Dataset preview (1 changed entry)

How these entries will read once merged, straight from the generator.

Bitcoin blockchain in BigQuery

/datasets/bigquery-crypto-bitcoin/

Two BigQuery tables covering the chain, one row per block and one per transaction, with each transaction's inputs and outputs nested alongside their addresses, script, type and value, plus views that flatten them. Google's public dataset program hosts it, loaded by the open source Blockchain ETL pipeline from a node. Useful for SQL analysis of the whole chain without running an indexer; querying needs a Google Cloud project.

Field Value
Category Transactions
Format CSV, JSON Lines, Parquet
License Not specified (bitcoin-etl extraction code is MIT)
Author Google Cloud Public Dataset Program
Tags addresses, blocks, fees, mainnet, transactions
Description 3 sentences, 68 words

Links, in the order they will render:

Generated by ci/preview.py.

Comment thread datasets/bigquery-crypto-bitcoin.toml Resolved
@b10claude
b10claude force-pushed the add-bigquery-crypto-bitcoin branch from de3a04e to c86dd37 Compare November 5, 2026 19:50
@0xB10C
0xB10C merged commit 84aecaa into bitcoin-data:main Nov 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants