在Postgres中,我有一个名为"mytable“的表,其中有两个列,id (bigint)和value (varchar(255))。id使用nextval('my_sequence')从序列中获取其值。PySpark应用程序接受一个dataframe并使用postgresql(PostgreSQL42.1.4.jar)将数据插入到"mytable“中。我使用以下方法创建id列:
df.withColumn('id', li
我想使用jooq批量插入postgres: List<MyTableRecord> records = new ArrayList<>(); FieldsequenceId);}
using(ctx).batchInsert(records).execute(); 问题是我正在获取每一行的下一个序列号对于简单的插入