oracle sequence number

austinoyoung
New Contributor III

Dear All,

I am trying to use jdbc driver to connect to an oracle database and append a new record to a table. The table has a column needs to be populated with a sequence number. I've been trying to use select `<sequence_name>.nextval` to get the sequence number but got the `ORA-02287: sequence number not allowed here` error. I did some research online and some said we can't do this with pyspark so I wonder if anyone was able to do this without writing pure python code? Thanks so much!