ERROR 4368 while copy data from file to Table
While loading data via COPY command, it throws error "ERROR 4368 - Permission denied for storage location [/home/xxxxx/Product_Dimension.tbl]" and seems it can be loaded only via vsql using cat command to read the file and use STDIN. I have to load many files in a batch and direct load doesn't work, it will take addition effort to load one by one files.
0
Comments
There are two solutions here:
First, you could use COPY LOCAL. COPY LOCAL allows you to specify multiple filenames to load through vsql.
Second, you are likely getting this error because your Vertica user doesn't have permission to read data from this storage location. In which case you could either run as your dbadmin account, or ask your database administrator to create a storage location of the appropriate type and with the appropriate path so that you have permission to load the files in question:
https://my.vertica.com/docs/6.1.x/HTML/index.htm#17722.htm
The second approach will get you better performance. (COPY LOCAL still only loads one file at a time; it just loads a bunch of files automatically. We assume that you are running vsql remotely so network bandwidth is likely to be the bottleneck for you. Regular COPY can load many files simultaneously, in some cases utilizing more CPU cores to parse the files.)
Adam
Yes, I am using vsql remotely but loading via COPY only. Thanks again.
We could consider adding a file-permissions stage to installation. Realistically, in my experience at least, many first-time users just use the "dbadmin" Vertica role (the one created during installation that has full general access); and once installations become big enough to be multi-user, each such installation is a little different and most need a lot more than just storage locations in order to be generally useful. Realistically, managing any real multi-user system means understanding that system. (Otherwise you're as likely to configure it for someone else's use case as for your own -- a significant fraction of our users don't grant shell access to most Vertica account-holders and don't want them to have any local-filesystem access.) We could certainly make that easier; our Management Console already provides some assistance in setting up a Vertica cluster (and a nice graphical installer for Vertica itself, etc) but I don't think it yet addresses COPY storage locations in particular.