Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

csvim: a headered CSV that omits a column writes NULL into it - the column's defaultValue never applies to seeded rows

Open
#7,923 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@nedelcho-delchev-tues is already working on this.

Since Oct 20, 2026.

  • #7994 by @nedelcho-delchev-tues — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
database

Research direction

Start with components/data/data-csvim/.../CsvProcessor.java, especially the column-list construction in insert and value binding in insertCsvWithHeader; then trace the upsert path. Add or locate CSVIM fixtures for a defaulted column and a NOT NULL column without a default. Done means omitted header columns preserve database defaults on inserts and remain untouched on updates, while the missing required column fails with its name.

Written by the indexing model from the issue text.

Description

Problem

A headered CSV that omits a table column writes an explicit NULL into that column, so the column's declared defaultValue never applies to seeded rows.

CsvProcessor.insert builds the INSERT column list from tableMetadata.getColumns() (components/data/data-csvim/.../CsvProcessor.java:94-101), and insertCsvWithHeader binds getCsvValueForColumn(column) for every one of them (:250-261) — a column absent from the header binds NULL.

Observed effect

An intent-generated Product declares Type with init: 1 (schema "defaultValue": "1"). A seed CSV with header ID,NAME,CODE,PRICE,UUID,UO_M,TAX_RATE lands every product with PRODUCT_TYPE = NULL. Every picker narrowed by where: { Type: 1 } (all stock documents of an inventory model) then silently omits the seeded products, while UI-created products (which get the init: value) appear. Nothing logs.

Expected

For a CSV with a header, insert only the columns the header names (plus the primary key), so the database default applies to the rest — the same result a hand-written INSERT naming those columns gives. A NOT NULL column without a default that the CSV omits should keep failing loudly, with the column named.

Updates (upsert) should likewise leave absent columns untouched rather than nulling them.

Verify

A CSVIM fixture over a table with a defaulted column the CSV omits: the imported row carries the default; a second fixture omitting a NOT NULL defaultless column fails naming it.

Dominant language
Java
Stars
278
Forks
97
Avg merge
18h 53m
Merged PRs (30d)
228

Getting set up

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.

More from eclipse-dirigible/dirigible

All issues in eclipse-dirigible/dirigible

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.