D1 wrangler import [ERROR] {"D1_RESET_DO":true}

I am using the wrangler command to insert records into my D1 database but I am getting following response: šŸŒ€ File already uploaded. Processing. šŸŒ€ Starting import... šŸŒ€ Processed 35468 queries. šŸŒ€ Processed 72704 queries. šŸŒ€ Processed 110145 queries. āœ˜ [ERROR] {"D1_RESET_DO":true} Any idea?
5 Replies
jdruwe
jdruweOPā€¢5mo ago
Seems like it was caused by a unique constraint, would be helpful to get a better error message šŸ˜„
Chaika
Chaikaā€¢5mo ago
yeaa it's been brought up before to the d1 team that import doesn't have great errors. The team is active in #d1-database or could make a workers-sdk issue. There's a few open for import issues & a docs warning about foreign key constraints but looks like none strictly related to that
datwelk
datwelkā€¢2mo ago
i get the same error, @jdruwe how did you fix it? removing the unique constraint?
jdruwe
jdruweOPā€¢2mo ago
in my case de data i was inserting actually violated the index but the error was not clear
datwelk
datwelkā€¢2mo ago
gotcha, tnx

Did you find this page helpful?