MATLAB Answers

Vertica's COPY Statement is not working in MATLAB

1 view (last 30 days)
Hariprasad
Hariprasad on 28 Mar 2016
Edited: Walter Roberson on 28 Mar 2016
I'm trying to use the COPY statement available in Vertica to load data from a file into Vertica database table but I'm getting an error
'[Vertica][JDBC](11300) A ResultSet was expected but not generated from query "COPY myschema.mytable (FK_CUSTOMER_ID,FK_START_DATE_ID,FK_END_DATE_ID,FK_TRAVEL_ID,FK_ORIGIN_ID,FK_DEST_ID,FK_SEGMENT_ID, SEGMENT_PERCENTAGE,LAST_UPDATED) FROM LOCAL ''/my/full/path/to/file/test2.dat'' DELIMITER '',''". Query not executed. '
I'm trying to run this query from my local machine to linux server where the Vertica database is. Same query when run on sql client connected to vertica database, it runs perfectly and loads the data into the table.
I do not understand why it is not working in MATLAB. The database connection is also proper since I used the same connection settings to load data using datainsert. Any idea what I'm missing here? The query has to be:
COPY myschema.mytable (FK_CUSTOMER_ID, FK_START_DATE_ID, FK_END_DATE_ID, FK_TRAVEL_ID,FK_ORIGIN_ID, FK_DEST_ID, FK_SEGMENT_ID, SEGMENT_PERCENTAGE, LAST_UPDATED) FROM LOCAL '/Fullpath/to/file/test2.dat' DELIMITER ',' ;

  0 Comments

Sign in to comment.

Answers (0)