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

Wildcard / Unmatched fields #223

Open
lorenzpfei opened this issue Mar 29, 2024 · 5 comments
Open

Wildcard / Unmatched fields #223

lorenzpfei opened this issue Mar 29, 2024 · 5 comments

Comments

@lorenzpfei
Copy link

Hi Tableflow team, thanks for your nice work!

I'm using csv-import to import a csv with a lot of columns. For future use, we want to save all unmatched columns into our db as well. Therefore, we need to receive all unmatched columns.

Is there a possiblity to get those columns? If not it would be nice, if we could get them via onSubmit as a second param or via a wildcard in the template which might be less clean.

@ciminelli
Copy link
Member

@lorenzpfei thanks for the issue! I think this could work as an option to include the unmatched columns in the response.

@DenisStad
Copy link

@ciminelli I have a PR for this locally, it's pretty small. I'd be happy to share it and open a PR if you give me permission.

@ciminelli
Copy link
Member

@DenisStad that sounds great, you can open a PR from your fork and I'll check it out.

@lanthias
Copy link

👍 -- we need this too. Any timeline for when it will land? Great library!

@lanthias
Copy link

lanthias commented May 28, 2024

If simpler, some different ways to allow this would also be to:

a) Allow the component to take the data as a parameter and go immediately to the "Select header" or "Map columns" page. As it is trivial for users to build their own file input components, this means they could pre-process the file and extract the column names (and perhaps do some necessary processing on them beforehand), and pass these column names and the data into the component so the user can map them properly.

b) Allow template to be a function which is passed the data upon CSV upload. This would be useful as we have a list of required columns but also want the user to provide other columns dynamically -- but they may only want to upload a subset of these, or we may want to exclude or special-case certain columns. Having a generic wildcard which uploads all other columns wouldn't allow this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants