mirror of
https://github.com/blockchain-etl/ethereum-etl.git
synced 2026-01-10 14:27:54 -05:00
22 lines
543 B
SQL
22 lines
543 B
SQL
CREATE EXTERNAL TABLE IF NOT EXISTS tokens (
|
|
address STRING,
|
|
symbol STRING,
|
|
name STRING,
|
|
decimals BIGINT,
|
|
total_supply DECIMAL(38,0)
|
|
)
|
|
PARTITIONED BY (start_block BIGINT, end_block BIGINT)
|
|
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
|
|
WITH SERDEPROPERTIES (
|
|
'serialization.format' = ',',
|
|
'field.delim' = ',',
|
|
'escape.delim' = '\\'
|
|
)
|
|
STORED AS TEXTFILE
|
|
LOCATION 's3://<your_bucket>/ethereumetl/export/tokens'
|
|
TBLPROPERTIES (
|
|
'skip.header.line.count' = '1'
|
|
);
|
|
|
|
MSCK REPAIR TABLE tokens;
|