I have a CSV, which has a variable structure, which I only want to take the first 4 values from. The CSV stored in S3 has between 7 and 8 fields in it, and I would like to take just the first 4. I have attempted to use the following prepared statement:
INSERT INTO locations (timestamp, item_id, latitude, longitude) VALUES (?, ?, ?, ?);
However I am getting:
Parameter index out of range (5 > number of parameters, which is 4).
Which I believe means that it is attempting to load in the other variables in the CSV. Is it possible to just take the first 4 values? Or otherwise deal with a variable length CSV?