@@Rowcount

Moderator: NorbertKrupa

micha034
Newbie
Newbie
Posts: 5
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: 5
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 :)

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

Re: @@Rowcount

Post by micha034 » Tue Mar 13, 2018 10:33 am

New update about my issues.

While previously presented solution helped in 99% of the cases.
Now we reached the point of loading chunks of data with more than Integer.MAX_VALE of rows (8 billion actually :) ).

JDBC affected rows returns only int and JDBC "executeLargeUpdate" that was built for such cases and returns long is not support in Vertica 8.1.1 implementation.

Post Reply

Return to “Vertica SQL”