This does not ring a bell for me. Most likely would be if there is stale data in your table from an earlier attempt.
Which version of MonetDB are you using? And which library does your ETL tool use to access MonetDB (I don't know anything about Spark).
Maybe you can investigate
- whether the table indeed started out empty;
- whether de additional rows are duplicates of existing source rows or if they are simply garbage;
- maybe you can investigate exactly which statements your ETL tool executes, table
sys.queue
might be helpful there;
- and try to recreate them in a standalone sql script (to be executed through
mclient
) which reproduces the issue;
- whether the ETL correctly detects any errors that might be returned by the statements it executes, or that it may have swallowed a helpful error message;
- whether the ETL tool can be made to log somewhere the number of rows it believes to have created in MonetDB.
I'm sorry I cannot give you a more specific answer, this is going to require some digging.