Copy Command Not Throwing Error

Moderator: NorbertKrupa

Post Reply
Blincan
Newbie
Newbie
Posts: 2
Joined: Wed Dec 11, 2013 10:33 pm

Copy Command Not Throwing Error

Post by Blincan » Wed Dec 11, 2013 11:45 pm

Code: Select all

set search_path=baseball;
DROP TABLE IF EXISTS HPLABS_DEMO.baseball.carss;
DROP SEQUENCE if EXISTS HPLABS_DEMO.baseball.house;
CREATE SEQUENCE house start 1; 

CREATE TABLE HPLABS_DEMO.baseball.cars
(
SEQ_EVENTS numeric DEFAULT NEXTVAL('EVENT_SEQ') PRIMARY KEY,
c varchar(12) NOT NULL,
d VARCHAR(12) not null,
s int NOT NULL
); 

copy HPLABS_DEMO.baseball.cars
(
	c, 
	d,
	s 
)
						FROM LOCAL 'C:\Users\KIWI\Desktop\cars.csv'	
						DELIMITER ','
						NULL AS ''
						DIRECT
					;

Code: Select all

SET executed successfully

Execution time: 0s
(Statement 1 of 6 finished)

Table 'HPLABS_DEMO.baseball.cars' dropped

Execution time: 0s
(Statement 2 of 6 finished)

Sequence 'HPLABS_DEMO.baseball.house' dropped

Execution time: 0s
(Statement 3 of 6 finished)

Sequence 'house' created

Execution time: 0s
(Statement 4 of 6 finished)

Table 'HPLABS_DEMO.baseball.cars' created

Execution time: 0.01s
(Statement 5 of 6 finished)

0 row(s) affected.
copy executed successfully

Execution time: 0.03s
(Statement 6 of 6 finished)

Script execution finished
Total script execution time: 0.05s

The first is my script, the .csv file has columns correlating to the schema.

Does anyone know why it woun't add the rows?

any help would be excellent! thanks!

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Copy Command Not Throwing Error

Post by id10t » Thu Dec 12, 2013 9:04 am

Hi!

[DELETED]
Last edited by id10t on Fri May 08, 2015 9:21 pm, edited 1 time in total.

Blincan
Newbie
Newbie
Posts: 2
Joined: Wed Dec 11, 2013 10:33 pm

Re: Copy Command Not Throwing Error

Post by Blincan » Thu Dec 12, 2013 11:26 pm

Skwa!

Thank you for directing me to the proper methods. Of course silly mistakes. Except and rejected files are key.

Post Reply

Return to “Vertica Data Load”