Skip to content

[Importer] Allow to reference importing rows #8203

Description

@wolflu05

Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

Problem statement

When importing a dataset it is not possible to reference other rows from the current dataset. This is required to import a deeply nested category tree, location tree, ... (ref: #8166 (comment))

Suggested solution

Allow to select an extra column for the primary key of the dataset lines. Then this column can be used to lookup rows when other rows reference e.g. *1 (where the * means look for a row in the current dataset with this id.).

Example:

pk,name,parent
1,Electronic Parts1,
2,Passives,*1
3,Resistors,*2
4,Capacitors,*2
5,IC,*1
6,Mechanic Parts,

This then can be used to build a graph of data and then start by importing the root node first, then the Childs of the root node, ...

Describe alternatives you've considered

Import categories or locations "level by level"

Examples of other systems

No response

Do you want to develop this?

  • I want to develop this.

Activity

  1. added
    enhancement
    import / export
    triage:not-checked
    on Sep 27, 2024
  2. SchrodingersGat commented on Sep 27, 2024

    @SchrodingersGat
    Member

    We already have a unique "row" number (within the dataset) - we could use this, perhaps?

  3. wolflu05 commented on Sep 27, 2024

    @wolflu05
    MemberAuthor

    What column are you referring too? You mean the index of the entry in the csv file? I would argument that this is not a great idea, as then we rely on the order of the lines in the csv table. And the order may change if people manually modify the file.

  4. SchrodingersGat commented on Sep 27, 2024

    @SchrodingersGat
    Member

    Fair point!

  5. github-actions commented on Nov 27, 2024

    @github-actions
    Contributor

    This issue seems stale. Please react to show this is still important.

  6. added
    inactive
    on Nov 27, 2024
  7. SchrodingersGat commented on Nov 27, 2024

    @SchrodingersGat
    Member

    Not stale

  8. added this to the horizon milestone on Nov 27, 2024
  9. removed
    inactive
    triage:not-checked
    on Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementimport / export

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions