- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 05:32 PM - edited 06-10-2024 05:36 PM
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
df.write
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 09:56 PM
@JamesY
Try adding the missing columns as a dummy columns. I've seen this issue happening some time ago - it looks like it's still not fixed.