using https://spark.apache.org/docs/latest/sql-programming-guide.html#loading-data-programmatically or LOAD INPATH, see db insert into