[ 
https://issues.apache.org/jira/browse/PHOENIX-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13920110#comment-13920110
 ] 

James Violette commented on PHOENIX-53:
---------------------------------------

You need to supply the table name in the command. 

The error message could be improved, but that would be in a separate Jira 
issue, as I preseved most of the messaging in this patch.

./psql.py -t WEB_STAT blvdevhdp04 ../examples/web_stat.sql 
../examples/web_stat.csv
no rows upserted
Time: 0.356 sec(s)

csv columns from database.
phoenix columnInfo length=7, org.apache.phoenix.util.ColumnInfo@4ca68fd8, 
org.apache.phoenix.util.ColumnInfo@4b2dd538, 
org.apache.phoenix.util.ColumnInfo@2e097617, 
org.apache.phoenix.util.ColumnInfo@6f27f79d, 
org.apache.phoenix.util.ColumnInfo@28f19d6e, 
org.apache.phoenix.util.ColumnInfo@e96b5c2, 
org.apache.phoenix.util.ColumnInfo@4876db09
CSV Upsert complete. 39 rows upserted
Time: 0.065 sec(s)


> Replace CSV loader with Apache Commons CSV loader
> -------------------------------------------------
>
>                 Key: PHOENIX-53
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-53
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 2.2.3, 3.0.0
>            Reporter: James Violette
>              Labels: patch
>             Fix For: 3.0.0
>
>         Attachments: commons-csv-1.0-SNAPSHOT-sources.jar, 
> commons-csv-1.0-SNAPSHOT.jar, csvloaderoverrides.diff, csvloadersource.diff, 
> incubator-phoenix-commons-csv-rev2-3.0.0.patch
>
>
> in org.apache.phoenix.util.CSVLoader, the upsert fails if it encounters an 
> empty line.  This occurs if all lines end with the new line character and the 
> reader returns an empty line at the end. Other issues, such as encapsulated 
> meta characters also occur.
> The fix is to replace the opencsv library with the current apache commons-csv 
> library.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to