question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues with importing multiple files in Delimited File Importer

See original GitHub issue

Prerequisites

Description

Currently in the Delimited File Importer, you have the ability to import from multiple files at once. One big problem with it though is that there is a big (flawed) assumption that all the files you are trying to import have the same structure which causes trouble when trying to apply the specified attribute mapping across all files. To help with this, I propose one of two solutions:

  1. Better enforce that all files that are being added need to have the same structure (so that the mapping makes sense across all files)
  2. Allow each file to be handled separately. There’s a number of ways that this could be done but a couple that come to mind are only importing selected/highlighted files (i.e. you don’t have to import every file you’ve added) or allowing files to have individual mappings (i.e. you don’t have to apply to same mapping across every file you’ve added)

There will be a similar situation for the JDBC importer.

Steps to Reproduce

  1. Open Delimited File Importer
  2. Add 2 different files to the importer (can be completely different types or the same type but with different structures)
  3. Apply a mapping to one of the files and Click import

Expected behaviour: One of the above suggestions should be implemented to reduce the chance of this happening

Actual behaviour: Mapping tries to be applied to all the files, exceptions potentially thrown if there are mapping issues

Reproduces how often: 100%

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
GammaVelcommented, Feb 9, 2022

Thanks @Auriga2 and @antares1470 for clarifying the difference, that is working a real treat now. As an enhancement I think it would be better if the error text had remove instead of delete, as it made me think my file would be deleted! I added in an enhancement ticket for that small update.

1reaction
Auriga2commented, Jun 9, 2021

https://github.com/constellation-app/constellation/pull/610 restricts to enter files of only a single type (see the gif in https://github.com/constellation-app/constellation/issues/600) but the recent refactoring has broken that functionality. Can easily fix that.

Regarding the different structures, I am not sure it’s a good idea to handle only the selected file, if we allow them to add multiple files. I vaguely remember someone saying they’d have the same structure in the common user case. Might be worth checking with users. Also if they need to import from a different structure, they can drag and drop and import that different part afterwards.

As per the discussion if we need to handle files with no extensions, we can add a “No Extension” or “All types” or similar entry in the drop down to handle this, but the user has to make sure to select only a single type to avoid issues.

JDBC importer is not affected with this because there’s only one set of query results at a given time, as it only works for a single query at the moment. (If multiple queries are added, only the first is executed.) Might be worth mentioning this in the help page though. (Do we need to support multiple queries here? If so, it’ll then be confusing as it can result in different structures)

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 Common CSV Import Errors and How to Fix Them - Flatfile
One of the most common CSV import errors is that the file is simply too large. That can be caused by too many...
Read more >
Tackling the most common errors when trying to import a CSV
When you're importing with CSV, there are some very common issues that, regardless of the data contained in your file, you may run...
Read more >
Common Problems with Import Files
This guide covers common problems encountered when loading your import file into WP All Import.
Read more >
issues with importing multiple files · Legacy Forums - Omeka
It seems the interface should be updated to allow only one column to be mapped as a File, or the plugin should be...
Read more >
Import automatically multiple pipe delimited files to different ...
Several issues. First, University Edition CANNOT see your C: drive, it can only see the shared folder from inside the virtual machine. There,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found