Import a csv with 6496 obs. of 188 variables in Vertica
I'm trying to import a csv file with 6496 observations and 188 variables, the size is about 4,7Mb.
The examples I saw have more simple tables, then I don't know how can I do it. Also I want to know how to manage huge csv and import them to Vertica.
Thanks!
The examples I saw have more simple tables, then I don't know how can I do it. Also I want to know how to manage huge csv and import them to Vertica.
Thanks!
0
Comments
concat(",", B1, "as ",(if(type(b1)=1, "bigint", "string"))
you can use similar tricks to speed up the load local and quickly write the insert statement. There wont be a really fast way to handle any logic applied to the data as its getting in (like date formatting or conditionals) so you will have to go through them. It will be a long process of trial and error until all the fields and values load properly.
The sqlSave command don't use any parser to create the sql insert, that it's a little bit complex with this number of variables.
I don't know if exist other way more quicker to import the csv file.
Did you try copy with direct option ? If not, it might help to insert data quicker by loading data directly into ROS.
It case be used at the end of statement like
COPY fact FROM 'fact.txt' DELIMITER '|' EXCEPTIONS ' except.log' REJECTED DATA 'rejects.log' DIRECT ;
Or you can use insert with direct hint
http://my.vertica.com/docs/5.0/HTML/Master/1342.htm
One of the above or both should make insert faster.