chmury_projekt/labs/sqlQueries/create_processed_table.sql

24 lines
703 B
MySQL
Raw Normal View History

2024-05-31 23:49:46 +02:00
CREATE EXTERNAL TABLE datalake_processed_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-processed-878695318857-ek-1201695/processed-zone/stockdata/'
TBLPROPERTIES (
'useGlueParquetWriter'='true');