Skip to content
Advertisement

Create Table Query for Redshift for the given datatypes

for below data set can anyone provide me the redshift query please

0     object
1     object
2    float64
3    float64
4     object
5     object
dtype: object

the query that i have tried is

CREATE TABLE `promos_zivame` (SKU varchar(max), Category_id varchar(max) NOT NULL, price int(max), specialPrice int(max), sizes varchar(MAX), offer varchar(MAX), Date_Time TIMESTAMP(max)) 

The error im getting this error

Error encountered: Load into table ‘promos_zivame’ failed. Check ‘stl_load_errors’ system table for details.

The data present in those objects are

enter image description here

enter image description here

Advertisement

Answer

Try this.

CREATE TABLE `promos_zivame` (
SKU varchar(max), 
Category_id varchar(max) NOT NULL, 
price INTEGER, 
specialPrice INTEGER, 
sizes varchar(MAX), 
offer varchar(MAX), 
Date_Time TIMESTAMP) 

INT and TIMESTAMP doesn’t take MAX arguments.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement