Using Wild Card with COPY LOCAL

Moderator: NorbertKrupa

Post Reply
kbulchan
Newbie
Newbie
Posts: 3
Joined: Fri Aug 01, 2014 12:11 pm

Using Wild Card with COPY LOCAL

Post by kbulchan » Fri Aug 01, 2014 12:21 pm

Hello,
I was trying to use COPY LOCAL to load multiple files stored in a folder using wild card as shown below:-

COPY DATA_test
(
COLUMN001
, COLUMN002
, COLUMN003
)

FROM
LOCAL 'D:\Users\kbulchan\Documents\testdata\*.csv'
DELIMITER ',' ENCLOSED BY '"'
DIRECT
EXCEPTIONS 'D:\Users\kbulchan\Documents\Log\Exception.txt'
REJECTED DATA 'D:\Users\kbulchan\Documents\Log\Reject.txt'
;
But get file not recognised error, I have checked this forum and found it works in the unix environment. Is it possible to use in sql editor environment too?

Thanks
kbulchan

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: Using Wild Card with COPY LOCAL

Post by NorbertKrupa » Fri Aug 01, 2014 2:47 pm

How are you setting D:\ to be local to Vertica?
Checkout vertica.tips for more Vertica resources.

kbulchan
Newbie
Newbie
Posts: 3
Joined: Fri Aug 01, 2014 12:11 pm

Re: Using Wild Card with COPY LOCAL

Post by kbulchan » Mon Aug 04, 2014 4:47 pm

Thanks for getting back on this norbertk. I am not sure about that question as I have no clue about the permissions for vertica.
I have installed the vertica client on my machine and running the script using Dbvisualiser.
The strange part is that the same script works for one of my colleague absolutely fine and for another colleague it works ok on D drive and not C drive which is strange.
Would you know how does the permissions work for running on the client machine?

Thanks
kbulchan

kbulchan
Newbie
Newbie
Posts: 3
Joined: Fri Aug 01, 2014 12:11 pm

Re: Using Wild Card with COPY LOCAL

Post by kbulchan » Mon Aug 04, 2014 4:56 pm

I tried pasting the folder on C drive and the script runs successfully!
Can you please explain how does the access from drives to Vertica works and how can it be managed?
Thanks
kbulchan

Post Reply

Return to “New to Vertica SQL”