chmury_projekt/labs/sqlQueries/create_proccessed_stockdata.sql

22 lines
648 B
MySQL
Raw Permalink Normal View History

2024-05-31 23:49:46 +02:00
CREATE EXTERNAL TABLE datalake_raw_878695318857_ek_1201695.processed_stockdata(
transaction_date timestamp,
price double,
amount double,
dollar_amount double,
type string,
trans_id bigint)
PARTITIONED BY (
symbol string,
year integer,
month integer,
day integer,
hour integer
)
ROW FORMAT SERDE
'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
's3://datalake-raw-878695318857-ek-1201695/processed-zone/stockdata/';