For some reason, MySQL gives this obscure error message when the data you are loading breaks a foreign key constraint (described in more detail here).
I managed to get the correct error message by executing the load data
command directly from the command line. i.e. running:
mysql -u username -p --local-infile --execute= \
"load data local infile '/tmp/my_data.tsv' into table my_schema.my_table \
fields terminated by '\t' optionally enclosed by '\"' escaped by '\\\\';"
gave the error message:
Cannot add or update a child row: a foreign key constraint fails
(`my_schema`.`my_table`, CONSTRAINT `other_table` FOREIGN KEY
(`id`) REFERENCES `other_table` (`id`))
After removing rows that violated the foreign key constraint, I was able to import my data.