Tabular import
Does my table import survive what real tools export?
The tabular-import preset builds a whole set of real test files for this question in one
command, and a manifest.json beside them saying how your system should react to each
file. Everything below is read from the program, at the defaults of this version.
What does it usually find?
- a semicolon file read as one column, because the delimiter was assumed rather than looked for
- a CRLF file split into rows with an empty row after each one
- a headerless table whose first row of data is eaten as column names
- an import that keeps the columns it can show and drops the rest without a word
- a reader that takes JSON records one line at a time and stops at the first indented document
What is in the set?
At its defaults, as tfg preset show tabular-import reports it:
| Files | 13 |
|---|---|
| Targets in its recipe | 13 |
| Total size | 3 080 060 B |
| Formats | csv, json, xlsx |
And what the manifest of that set expects from your system:
| Expected | Meaning | Files |
|---|---|---|
accept | Your system should take the file. | 8 |
unspecified | It depends on the rules of your system. You decide, then check that what happens is what you meant. | 5 |
What can you change?
| Setting | Takes | Default | What it does |
|---|---|---|---|
--rows |
1 - 200000 rows | 1000 |
How many rows the spreadsheet holds. It is written at exactly the size that many rows package to, so the budget above moves with this. |
--columns |
1 - 32768 columns | 10 |
How many columns each row of the spreadsheet has. Rows times columns has a ceiling, and asking past it is refused before anything is written. |
How do you run it?
See what the set would cost, build it, or take its recipe to edit:
tfg preset show tabular-import
tfg generate --preset tabular-import --out ./tabular-import
tfg preset eject tabular-import > tabular-import.yaml
Or build on it in a recipe of your own, next to your tests:
version: 1
extends: preset:tabular-import