mirror of
https://github.com/blockchain-etl/ethereum-etl.git
synced 2026-01-09 13:57:54 -05:00
22 lines
567 B
SQL
22 lines
567 B
SQL
CREATE EXTERNAL TABLE IF NOT EXISTS transactions (
|
|
hash STRING,
|
|
nonce BIGINT,
|
|
block_hash STRING,
|
|
block_number BIGINT,
|
|
transaction_index BIGINT,
|
|
from_address STRING,
|
|
to_address STRING,
|
|
value DECIMAL(38,0),
|
|
gas BIGINT,
|
|
gas_price BIGINT,
|
|
input STRING,
|
|
max_fee_per_gas BIGINT,
|
|
max_priority_fee_per_gas BIGINT,
|
|
transaction_type BIGINT
|
|
)
|
|
PARTITIONED BY (block_date STRING)
|
|
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
|
|
LOCATION 's3://<your_bucket>/export/transactions/';
|
|
|
|
MSCK REPAIR TABLE transactions;
|