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

Importer specification with individual cells #2836

Closed
JustinasJas opened this issue Jun 12, 2024 · 2 comments · Fixed by spine-tools/spine-items#249
Closed

Importer specification with individual cells #2836

JustinasJas opened this issue Jun 12, 2024 · 2 comments · Fixed by spine-tools/spine-items#249
Assignees
Labels
Data import/export enhancement Enhancement of existing feature UI
Milestone

Comments

@JustinasJas
Copy link

There is no way in Importer to map individual cells or column headings that are not on the top row.
The issue is the most notable for data sheets with metadata. Metadata at the top rows of the sheet prohibit use of column headings. Metadata itself can often be specified in one or two cells.
Currently working around this limitation by typing content of such cells manually as constants.

@JustinasJas JustinasJas added enhancement Enhancement of existing feature UI Data import/export labels Jun 12, 2024
@jkiviluo jkiviluo added this to the v0.10.0 milestone Jun 19, 2024
@soininen
Copy link
Contributor

Did I understand this correctly, you would like to specify the exact coordinates (row, column) for a mapping?

@JustinasJas
Copy link
Author

Yes, I think that would be the most general solution as it would allow to read content of any cell. I assume that is fitting for the toolbox as one can already type anything as a constant.

@jkiviluo jkiviluo modified the milestones: v0.10.0, V1.0 Oct 8, 2024
soininen added a commit to spine-tools/Spine-Database-API that referenced this issue Feb 20, 2025
- ImportMapping now supports a new position, Position.fixed.
  Mapping's value must be set to '<table name>: <row>, <column>' or
  '<row>, <column>' which specifies which cell will be imported.
- Renamed import connectors to readers to make things consistent with
  export writers.
- Reader.resolve_values_for_fixed_position_mappings() will replace
  the position of fixed position mappings by (unused) column number
  and mapping's value by the value in the specified cell.
  This way the mapping becomes a constant value mapping.
- Fixed minor issues, especially in CSVReader.

Re spine-tools/Spine-Toolbox#2836
soininen added a commit to spine-tools/spine-items that referenced this issue Feb 20, 2025
- Position.fixed works now in Importer.
- Connectors are now Readers.
- Used the term 'input type' for connector where appropriate,
  also in the UI.
- Fixed minor issues, e.g. removed the defunc context menu option
  to switch input type in Importer's properties tab.

Re spine-tools/Spine-Toolbox#2836
soininen added a commit to spine-tools/Spine-Database-API that referenced this issue Feb 20, 2025
- ImportMapping now supports a new position, Position.fixed.
  Mapping's value must be set to '<table name>: <row>, <column>' or
  '<row>, <column>' which specifies which cell will be imported.
- Renamed import connectors to readers to make things consistent with
  export writers.
- Reader.resolve_values_for_fixed_position_mappings() will replace
  the position of fixed position mappings by (unused) column number
  and mapping's value by the value in the specified cell.
  This way the mapping becomes a constant value mapping.
- Fixed minor issues, especially in CSVReader.

Re spine-tools/Spine-Toolbox#2836
soininen added a commit that referenced this issue Feb 20, 2025
Accidentally rewrote all .ui files. Just in case, I guess.

Re #2836
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data import/export enhancement Enhancement of existing feature UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants