@@Rowcount

Moderator: NorbertKrupa

micha034
Newbie
Newbie
Posts: 4
Joined: Mon Feb 12, 2018 5:20 pm

Re: @@Rowcount

Post by micha034 » Tue Feb 13, 2018 7:13 am

Thanks again for your help.

GET_NUM_ACCEPTED_ROWS is not supported on multi node operation.
We worked with this function when we we used WEBHDFS protocol and it was ok but this not working with 'hdfs://' protocol.

Following exception is thrown:
Caused by: com.vertica.support.exceptions.FeatureNotSupportedException: [Vertica][VJDBC](4106) ERROR: No single-source bulk loads have been executed in this session

GET_NUM_ACCEPTED_ROWS supported only with single-source bulk load operations as written in documentation.

Any additional help would be appreciated :)

micha034
Newbie
Newbie
Posts: 4
Joined: Mon Feb 12, 2018 5:20 pm

Re: @@Rowcount

Post by micha034 » Tue Feb 13, 2018 9:38 am

Ok, it was pretty "stupid"

From some reason JDBC implementation of Vertica on calls without statement returns affected rows correctly but with prepared statement returns 0;

1. No prepared statement = GOOD
int accepted = conn.executeUpdate(copyQuery); --- > return number of affected rows

2. With prepared statement = BAD
PreparedStatement copyStatement = conn.prepareStatement(copyQuery))
int accepted1 = copyStatement.executeUpdate(); --- > returns 0
int accepted2 = copyStatement.getUpdateCount(); --- > returns 0

Thanks again for help.
Hope my information helped :)

Post Reply

Return to “Vertica SQL”