Scala, I am trying to write dataframe to sqlmi table, it works for all other table when dataframe columns matches table columns, and I created a new table with the identity and auto-initialized column, from what I understand, by default, I don't need to add value for these two column, and thus my dataframe doesn't include the two columns, but I got an error of:
Spark Dataframe and SQL Server table have differing numbers of columns
How to write data correctly to this type of table?
df.write
.format("jdbc")
.mode("append")
.option("url", ...)
.option("dbtable", ...)
.save();