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.xlsx
smarttable_imagedata.csv
smarttable_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 thebasic
section ofinvoice.json
.custom/<key in invoice.json>
: mapped to thecustom
section ofinvoice.json
.sample/<key in invoice.json>
: mapped to thesample
section ofinvoice.json
.sample/generalAttributes.<termId>
: mapped to thevalue
of the matchingtermId
in thegeneralAttributes
array.sample/specificAttributes.<classId>.<termId>
: mapped to thevalue
of the matchingclassId
andtermId
in thespecificAttributes
array.inputdataX
: specifies a file path inside the ZIP file (X = 1, 2, 3, …).
Currently, table data is automatically expanded only into
invoice.json
. 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.txt
ininputdata1
,file1.txt
must exist inside the ZIP file. - If you put
data1/file1.txt
ininputdata1
anddata1/file2.txt
ininputdata2
, 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.csv
inputdata.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 Structured 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 |
|