Specify related objects by attribute during CSV import. Case #3147 #11988
Unanswered
kevintedder
asked this question in
Q&A
Replies: 2 comments 3 replies
-
virtual_machine.site and virtual_machine.name are not column names, I believe this is being interpreted as virtual_machine column twice, which is why it is seen a 4 columns and not 5. You probably want "site" and "name", but the import page lists the expected field names.
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: kevintedder ***@***.***>
Sent: Wednesday, March 15, 2023 11:52 AM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [netbox-community/netbox] Specify related objects by attribute during CSV import. Case #3147 (Discussion #11988)
Issue #3147<#3147> answers my needs as I have duplicate named devices. However when I follow the details in this case it does not work.
The CSV file is follows:
address,status,virtual_machine.site,virtual_machine.name,interface
192.168.1.1/30,active,SITE_A,Server_1,Net1
Error message:
Row 1: Expected 4 columns but found 5
If I add another field
address,status,virtual_machine.site,virtual_machine.name,interface,dns_name
192.168.1.1/30,active,SITE_A,Server_1,Net1
Error message:
Row 1 virtual_machine: Object not found
Row 1 interface : Object not found
Using v3.3.2
What am I doing wrong?
—
Reply to this email directly, view it on GitHub<#11988>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM3DQ6JR35KI6KJ4SI3W4HXTFANCNFSM6AAAAAAV4DNEYQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes it's a weird error message, when clearly there are 5 CSV entries in the header and the row (confirmed here). #3147 is very old, and I've never imported a CSV file in the way you show; I also don't see any test cases for the format you're using in |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue #3147 answers my needs as I have duplicate named devices. However when I follow the details in this case it does not work.
The CSV file is follows:
address,status,virtual_machine.site,virtual_machine.name,interface
192.168.1.1/30,active,SITE_A,Server_1,Net1
Error message:
Row 1: Expected 4 columns but found 5
If I add another field
address,status,virtual_machine.site,virtual_machine.name,interface,dns_name
192.168.1.1/30,active,SITE_A,Server_1,Net1
Error message:
Row 1 virtual_machine: Object not found
Row 1 interface : Object not found
Using v3.3.2
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions