DB2 Sequence - Error while invoking

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

DB2 Sequence - Error while invoking

☼ R Nair (रविशंकर नायर)
Hi all,

We are trying to call the DB2 Sequence through Spark and assign that value to one of the column (PK) in table. We are getting the below issue:

SEQ: CITI_VENDOR_UNITED_LIST_TARGET_SEQ
Table: CITI_VENDOR_UNITED_LIST_TARGET
DB: CITIVENDORS
Host: CIT_XX
Port: 42194
Schema: MINE

DB2 SQL ERROR: SQLCODE = 348, SQLSTATE= 428F9 SQLERRMC=NEXTVAL FOR MINE.CITI_VENDOR_UNITED_LIST_TARGET_SEQ 

IS this error because SEQUENCE is not deterministic a column ? I can query using simple SQL. But not from my spark code. The spark code is usual one with connection properties using spark.read.jdbc.

Thanks and regards,
Ravion