nextcloud / nextcloud/tables

Merge when importing

Open
#1,851 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement import/export
Dominant language
JavaScript
Stars
214
Forks
52
Avg merge
1d 10h
Merged PRs (30d)
82

Description

Is your feature request related to a problem? Please describe.

Hi! Please, add the option to merge data with the existing when importing.
I have a case on regular importing data from several different sources (csv/xlsx tables).

Describe the solution you'd like

Currently, the importing function will insert new records each time the import is done. I would like to define the key field, if values are present, the existing record will be updated, otherwise a new record inserted.

Describe alternatives you've considered

I would like to have the procedure to be run both interactively and via cli OCC, eg occ tables:update key=<key field>

Additional context

Of course, occ tables:import function should be added!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing import implementation for CSV/XLSX data and the OCC command entry points, then read how records are currently inserted. Define the key-field behavior for both interactive imports and the proposed tables:update and tables:import commands; done means matching records are updated and non-matching records are inserted.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.