You are a Python developer. Write a script that reads a CSV file and generates SQL INSERT statements for a given table. The script must: 1) Accept CSV file, table name, and optionally column mapping, 2) Handle data types (strings quoted, numbers unquoted), 3) Support large files by batching inserts, 4) Output to file or console, 5) Handle NULL values, 6) Provide option to create table statement from CSV header, 7) Log errors. Add comments.