exports: per-field quoting and an end-of-file marker for delimited files (statutory text files)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by reading the implementation and tests for exports: with format: delimited, introduced in #7855; the payload does not name their file paths. Trace how field values are quoted and how record terminators are written. Done means a field-level quote override works alongside export-level quoting:, and endOfFile is written once, unquoted, after the final record terminator.
Written by the indexing model from the issue text.
Description
Ask
exports: with format: delimited (#7855, in 14.90.0) can quote none, what needs it or every value. A statutory file sometimes needs a mix, and an explicit end-of-file byte:
- Per-field quoting. A field-level
quote: true|falsethat overrides the export'squoting:. - An end-of-file marker. An export-level
endOfFile:(for example"\u001A"), written once after the last record terminator, unquoted and with no terminator of its own.
Why
The Bulgarian NRA's published rules for the Declaration 1 input file (Ordinance N-13 payroll declarations) are:
- windows-1251
- comma-separated
- Character data in double quotes, Number data not quoted
- every record ends CR LF
- the end of the file is CTRL+Z (0x1A)
Today the closest declaration is quoting: all, which also quotes the numbers. A trailer cannot write the marker either: under quoting: all the marker gets quoted, and every trailer gets a CR LF after it.
Repro (14.90.0)
exports:
- name: Declaration1
source: Declaration1Rows # a plain report
format: delimited
encoding: windows-1251
delimiter: ","
quote: '"'
quoting: all
lineEnding: crlf
ledger: DeclarationExport
parameters: [{ name: run, required: true }]
records:
- type: line
fields:
- { from: Employee.nationalId } # should be quoted
- { from: insuredDays } # should NOT be quoted
- { from: sum(insurableIncome), scale: 2 } # should NOT be quoted
Actual record: "7501010010","18","1500.00". The spec expects "7501010010",18,1500.00, and the file must end with 0x1A.
Where it is used
BusinessIntents/base-payroll#46. It is a draft on 14.90.0 and uses quoting: all until this ask lands. The same per-field need applies to Declaration 6 and to the other N-13 files.
- Dominant language
- Java
- Stars
- 278
- Forks
- 97
- Avg merge
- 18h 53m
- Merged PRs (30d)
- 228
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-dirigible/dirigible
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
eclipse-dirigible/dirigible#7958 ·
Maintainers usually reply within 1 day
-
intent: a create-from without fromStatus answers 200 on a missing or unknown source id (no 400/404)Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-dirigible/dirigible#7945 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-dirigible/dirigible#7891 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-dirigible/dirigible#6538 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
eclipse-dirigible/dirigible#4812 ·
Maintainers usually reply within 1 day
All issues in eclipse-dirigible/dirigible
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
account bug communication lecture
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
area/server bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/java-sdk#1196 ·
Maintainers usually reply within 1 day