Import Failure Handling #135

Closed
opened 2025-12-29 15:34:46 +01:00 by adam · 2 comments
Owner

Originally created by @ryanmerolle on GitHub (Jul 1, 2016).

I am testing much of the functionality here and I noticed that if I import records using the csv format, the tool fails on the whole import.

Would it be useful for it to succeed on what it can and report out status of failed (with the current error details) vs successful entries?

Originally created by @ryanmerolle on GitHub (Jul 1, 2016). I am testing much of the functionality here and I noticed that if I import records using the csv format, the tool fails on the whole import. Would it be useful for it to succeed on what it can and report out status of failed (with the current error details) vs successful entries?
adam closed this issue 2025-12-29 15:34:46 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 2, 2016):

CSV import is intentionally all-or-none. Imagine you're importing a hundred interface connections. NetBox gets halfway through and finds an error. If it didn't roll back the transaction, you'd be stuck with half of your connections created and the other half still missing. This would require you to delete all of the successfully imported connections before attempting another import.

It's a lot simpler IMO to just fix the error and try re-importing the whole batch again, especially when you're exporting to CSV from Google Sheets or Excel.

@jeremystretch commented on GitHub (Jul 2, 2016): CSV import is intentionally all-or-none. Imagine you're importing a hundred interface connections. NetBox gets halfway through and finds an error. If it didn't roll back the transaction, you'd be stuck with half of your connections created and the other half still missing. This would require you to delete all of the successfully imported connections before attempting another import. It's a lot simpler IMO to just fix the error and try re-importing the whole batch again, especially when you're exporting to CSV from Google Sheets or Excel.
Author
Owner

@ryanmerolle commented on GitHub (Jul 2, 2016):

Thanks for the insight into your thought process!

@ryanmerolle commented on GitHub (Jul 2, 2016): Thanks for the insight into your thought process!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#135