Column Mapping and Renaming in Bulk INSERT
Map JSON keys to different SQL column names, exclude unwanted columns, and customize the INSERT output with the column mapping feature.
Detailed Explanation
Column Mapping: Reshape Your Data
The column mapping feature lets you transform JSON keys into SQL column names, exclude columns you do not need, and control exactly what appears in the INSERT output.
Renaming Columns
JSON APIs often use camelCase, while SQL databases prefer snake_case:
| JSON Key | SQL Column |
|---|---|
firstName |
first_name |
lastName |
last_name |
emailAddress |
email_address |
createdAt |
created_at |
The tool shows each JSON key with an editable text field where you can type the desired SQL column name.
Excluding Columns
Some JSON fields may not belong in your SQL table:
- Internal IDs or metadata (
_id,__v,_etag) - Computed fields (
full_name,age) - Redundant data (
created_by_namewhen you havecreated_by_id)
Uncheck columns in the mapping section to exclude them from the INSERT output. Use "Select All" and "Deselect All" to quickly manage large column sets.
Example
Given this JSON:
[
{ "userId": 1, "firstName": "Alice", "lastName": "Smith", "_internal": "xyz", "score": 95 }
]
With mapping: userId → user_id, firstName → first_name, lastName → last_name, _internal excluded, score included as-is:
INSERT INTO "students" ("user_id", "first_name", "last_name", "score")
VALUES
(1, 'Alice', 'Smith', 95);
Type Inference with Mapping
Renaming a column does not affect type inference. The tool infers types from the JSON values regardless of what you name the SQL column. If you need to override a type, use the CREATE TABLE toggle and manually edit the output.
Preserving Mappings
Column mappings persist as long as the JSON structure remains the same. If you update the JSON input but keep the same keys, your custom column names and inclusion/exclusion choices are preserved.
Use Case
Your frontend team exports analytics data with camelCase keys, but your data warehouse uses snake_case conventions. Column mapping lets you transform the keys during INSERT generation without modifying the source JSON.