Vertica bulk upload failing from R

I have created a temporary table in my vertica and I have a csv file on a centos 7 server where my Rstudio server is installed.
dbSendQuery(vertica, "COPY hpcom_usr.VM_test FROM LOCAL \'/opt/mount1/MarketBasketAnalysis/Code/test.csv\' enclosed by \'\"\' DELIMITER \',\' direct REJECTED DATA \'./code/temp/rejected.txt\' EXCEPTIONS \'./code/temp/exceptions.txt\'")
When i am running this query . I am getting this error

Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set", :

Unable to retrieve JDBC result set
JDBC ERROR: [Vertica]JDBC A ResultSet was expected but not generated from query "COPY hpcom_usr.VM_test FROM LOCAL '/opt/mount1/musoumit/MarketBasketAnalysis/Code/test.csv' enclosed by '"' DELIMITER ',' direct REJECTED DATA './code/temp/rejected.txt' EXCEPTIONS './code/temp/exceptions.txt'". Query not executed.
I am running R studio >1.0 R 3.6.3 and tidyverse 1.0.3

Answers

  • moshegmosheg Vertica Employee Administrator

    Looks like the statement or the statement parsing fail, and then JDBC complains "ResultSet was expected but not generated".
    Try to run the same statement first in VSQL

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file