Table description

This table represents the transactions on the Bitcoin blockchain. A transaction is a transfer of Bitcoin value that is broadcast to the network and collected into blocks. A transaction typically references previous transaction outputs as new transaction inputs and dedicates all input Bitcoin values to new outputs. Transactions are not encrypted, so it is possible to browse and view every transaction ever collected into a block.

Column Descriptions

Datatypes on Snowflake datashare are different in some cases, read more here.

Table Sample

Struct definitions

Within several of these columns is a data type of STRUCT which allows for representing nested hierarchical data and has key-value pairs. It’s similar to a dictionary in python and can be used to group fields together to make them more accessible.

Note that you can work with these columns with the syntax input[1].witness_data[2] or input[3].script_pub_key.address depending on lengths of arrays within each value. It is an array(row(map)) type, and while it looks like just an array in the returned table - it is more than that!

input

FieldData typeDescription
valuedoubleThe number of Satoshis attached to this output
heightbigintThe height of the output
tx_idstringThe transaction id of the output that is here used as input
output_numberbigintThe number (index) of the output in transaction tx_id’s outputs
coinbasestringThe data specified in this transaction, if it was a coinbase transaction
sequencebigintSequence number
witness_dataarray<string>Array of hex encoded witness data
script_signaturestructThe script signature
script_pub_keystructThe script public key

input.script_signature

FieldData typeDescription
hexstringThe transaction’s script operations, in hex
asmstringThe transaction’s script operations, in symbolic representation

input.script_pub_key

FieldData typeDescription
asmstringThe transaction’s script operations, in symbolic representation
descstringThe transaction’s script operations, in symbolic representation
addressstringThe transaction’s script operations, in symbolic representation
hexstringThe transaction’s script operations, in hex
typestringThe address type of the output

output

FieldData typeDescription
indexbigint0-indexed number of an output within a transaction used by a later transaction to refer to that specific output
valuedoubleThe number of Satoshis attached to this output
script_pub_keystructThe public key

output.script_pub_key

FieldData typeDescription
asmstringThe transaction’s script operations, in symbolic representation
hexstringThe transaction’s script operations, in hex
addressstringThe address the BTC came from
typestringThe address type of the output