This function is for Spark connections only, it handles insert commands, as Spark cannot handle inserts with aliased or subset columns.

sparkHandleInsert(sql, connection)

Arguments

sql

The SQL to be translated.

connection

The connection to the database server.

Value

A sql string with INSERT command modified to contain the full column list, padded with NULLS as needed.