What is SmartTableInvoice Mode?
Purpose
A mode that reads metadata from table files (Excel/CSV/TSV) and automatically generates an invoice.json file.
Features
- Multi-format support: reads Excel (.xlsx), CSV, and TSV files
- Two-row header format: row 1 for display names, row 2 for mapping keys
- Automatic metadata mapping: generates structured data using the
basic/,custom/, andsample/prefixes - ZIP integration: automatically associates a ZIP that contains data files with the table file
When to Use
- When you want to register multiple data items by linking multiple files
How to Configure
No changes to the configuration file are required. However, you must place Excel/CSV/TSV files whose names begin with the smarttable_ prefix in the input data.
smarttable_tabledata.xlsxsmarttable_imagedata.csvsmarttable_20250101.tsv
Table Data Format
Overview
1 2 3 4 5 6 7 8 9 | |

Row 1: Display Names (User-Facing Descriptions)
This row is not used for data registration; it is for making the table easier to understand when managing it.
1 | |
Row 2: Mapping Keys
Metadata Mapping and Expansion
This row is read and automatically mapped to invoice.json and metadata. The mapping rules are as follows:
basic/<key in invoice.json>: mapped to thebasicsection ofinvoice.json.custom/<key in invoice.json>: mapped to thecustomsection ofinvoice.json.sample/<key in invoice.json>: mapped to thesamplesection ofinvoice.json.sample/generalAttributes.<termId>: mapped to thevalueof the matchingtermIdin thegeneralAttributesarray.sample/specificAttributes.<classId>.<termId>: mapped to thevalueof the matchingclassIdandtermIdin thespecificAttributesarray.meta/<metadata-def key>: written to theconstantsection ofmetadata.jsonaccording tometadata-def.json(values are cast usingschema.type, andunitis copied when provided). Entries marked withvariableare not supported at this time. Ifmetadata-def.jsonis absent, the meta columns are skipped as before.inputdataX: specifies a file path inside the ZIP file (X = 1, 2, 3, …).
Currently, table data is automatically expanded into
invoice.jsonandmetadata.json(formeta/columns). Other data is exposed so it can be used by the structured processing.
About Input File Handling
The key inputdata[number] is for entering the file paths you want to include in a single data tile. Specify paths inside the ZIP file.
- For example, if you put
data1/file1.txtininputdata1,file1.txtmust exist inside the ZIP file. - If you put
data1/file1.txtininputdata1anddata1/file2.txtininputdata2, they will be grouped so that both files can be read within the structured processing.
Row 3 and Onward
Enter the actual data to register. Each row is registered as one data tile.
1 2 | |
File Extensions
The table data file must have one of the following extensions: .csv, .xlsx, or .tsv.
About the Input Files
SmartTableInvoice mode requires specific input files: an Excel/CSV/TSV file containing the table data and a ZIP file containing the related data files.
smarttable_imagedata.csvinputdata.zip
Directory Structure
Place the Excel file and the ZIP file in the inputdata directory.
1 2 3 4 5 6 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
Retrieving a Single Row of Table Data in Structuring Processing
If you define the structured processing as shown below, you can obtain the CSV path from RdeOutputResourcePath.rawfiles. In the example directory structure above, this would be temp/fsmarttable_experiment_0001.csv, etc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
Registering the Table Data File with RDE
By default, the table data used by SmartTableInvoice mode is --not-- registered in RDE. You can register the table data in RDE by adding the following setting to the rdeconfig.yml configuration file.
1 2 | |
Automatic Sample Field Clearing Rule (New Sample Registration)
SmartTableInvoice mode generates each row's invoice.json by starting from the original invoice.json and then partially overwriting it with the row values. As a result, if no sample columns are supplied, the sample information from the original invoice remains as-is.
Given that behavior, when the sample/names column is specified and sample/sampleId does not contain a valid value, the row is treated as an intentional new sample registration. In that case, dummy sample fields inherited from the original invoice.json are automatically cleared.
Decision Rules
| SmartTable input | Interpretation | Behavior |
|---|---|---|
sample/names only |
New sample registration | Clear inherited dummy sample fields |
sample/names + empty sample/sampleId |
New sample registration | Same clearing behavior as missing sample/sampleId |
sample/names + non-empty sample/sampleId |
Existing sample reference | Do not run new-sample clearing |
No sample/names |
No sample-registration intent | Preserve sample fields from the original invoice.json |
A
sample/sampleIdcell that contains only whitespace is also treated as missing.
Fields Cleared
| Field | Value After Clearing | Notes |
|---|---|---|
sample.sampleId |
"" (empty string) |
Indicates a new sample |
sample.description |
null |
Resets dummy sample description |
sample.composition |
null |
Resets dummy sample composition |
sample.referenceUrl |
null |
Resets dummy sample reference URL |
sample.generalAttributes[*].value |
null |
Structure (termId) is preserved; only values are cleared |
sample.specificAttributes[*].value |
null |
Structure (classId+termId) is preserved; only values are cleared |
sample.ownerId |
Set from basic.dataOwnerId |
Existing rule (Issue #389) continues to apply |
Interaction with Blank Cells
In fixed-header SmartTable files, columns such as sample/sampleId, sample/description, or sample/generalAttributes.<termId> may always exist while individual cells are left blank.
When the row is interpreted as a new sample registration, those blank columns still preserve the normalized empty structure:
sample.sampleIdis kept as""instead of removing the keysample.description,sample.composition, andsample.referenceUrlare kept asnullsample.generalAttributes[*]andsample.specificAttributes[*]keep their entries, withvalue: null
By contrast, when sample/sampleId has a valid value and the row is treated as a reference to an existing sample, blank sample cells continue to use the normal SmartTable clearing behavior.
Examples
1 2 3 | |
In the above case, even if sampleId, description, etc. are set in the original invoice.json, they are all cleared and the row is registered as a new sample.
1 2 3 | |
In this case, sample.sampleId remains present as "", sample.description remains null, and the matching general attribute entry is preserved as {"termId": "...", "value": null}.
1 2 3 | |
In the above case, sampleId is preserved and the row is treated as a reference registration to an existing sample. If blank columns such as sample/description are present in the same row, those fields are still cleared using the normal blank-cell behavior.