Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Natural key multi column csv export #4367

Closed
lampwins opened this issue Aug 31, 2023 · 4 comments · Fixed by #4448
Closed

Natural key multi column csv export #4367

lampwins opened this issue Aug 31, 2023 · 4 comments · Fixed by #4448
Assignees
Labels
type: feature Introduction of new or enhanced functionality to the application
Milestone

Comments

@lampwins
Copy link
Member

lampwins commented Aug 31, 2023

As Ozzy the Operator, I want to be able to export Nautobot data that contains relationships to other data in a format that is clear and easy for me to understand.

I will know this is complete when CSV export supports multi column natural keys by allowing the various fields in a natural key to be separate fields in the export.

  • Fields should be named with double underscore deleters, I.e when exporting devices, the tenant field would be tenant__name, so they are round-trippable.
  • Device and location should honor the simplified natural key settings, e.g. DEVICE_NAME_NATURAL_KEY

This is the inverse of #3794

@lampwins lampwins added the type: feature Introduction of new or enhanced functionality to the application label Aug 31, 2023
@lampwins
Copy link
Member Author

@HanlinMiao
Copy link
Contributor

Should this be blocked by #4346?

@bryanculver
Copy link
Member

Should this be blocked by #4346?

If this gets done first it negates the need to change the export of #4346 from composite_key to pk. More likely this can just be a proper communication depending on the order they are picked up.

@bryanculver bryanculver added this to the v2.0.0 milestone Sep 7, 2023
@timizuoebideri1 timizuoebideri1 self-assigned this Sep 12, 2023
jathanism added a commit that referenced this issue Sep 15, 2023
…`BaseModel`. (#4439)

* Implemented `.natural_slug` property on all models that inherit from `BaseModel`.
- Added `emoji` as a dependency
- Added `python-slugify` as a dependency
- Replaced `composite_key` with natural_slug` in public interfaces.
- Left composite_key to serializers until after #4367 is complete.

---------

Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
@bryanculver
Copy link
Member

Due to M2M->CSV->M2M ugliness we are going to document not supporting M2Ms (except for tags) in CSV round trip and exclude testing for them for 2.0.0.

Future follow on may find a way to re-introduce them, or provide multi-part forms to handle this (see how we've documented addressing CSV import of IPAddress-to-Interface assignments via #4103)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new or enhanced functionality to the application
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants