tabular parsing from multiple excel sheets
Discussing with @amgo it came out that the following schema wouldn't work because I'm trying to parse data from different excel sheets.
I am trying to fill quantities in 3 different sections (from 3 different sheets) - note that this works with "mode: column":
- the root level, where TableData is inherited and where data_file quantity is placed
- my_subsection_1
- my_subsection_2
Is it possible to make the "mode" keyword specific for the targeted subsection? One could in this way parse one section in column and another in row mode?
If this is not possible, a workaround I see is to instantiate a data_file quantity in each subsection with either column or row modes, and then just link the quantity to the root level data_file one so the user does not need to put the same data_file in each section
One more point, if it is not possible to parse quantities directly in the root level (as it is for mode: column) I may think to move all the root level quantities in a sub_section called global
data:
m_def: My_Eln
data_file: test.xlsx
definitions:
name: 'test eln'
sections:
My_Eln:
base_sections:
- nomad.parsing.tabular.TableData
quantities:
data_file:
type: str
m_annotations:
tabular_parser:
comment: '#'
mode: row
target_sub_section:
- My_Eln # (not sure what would be needed here)
- my_subsection_1
- my_subsection_2
browser:
adaptor: RawFileAdaptor
eln:
component: FileEditQuantity
my_parsed_quantity_root:
type: str
m_annotations:
tabular:
name: Sheet_3/Column_header_3
eln:
component: StringEditQuantity
sub_sections:
my_subsection_1:
repeats: true
section:
m_annotations:
eln:
quantities:
my_parsed_quantity_1:
type: str
m_annotations:
tabular:
name: Sheet_1/Column_header_1
eln:
component: StringEditQuantity
my_subsection_2:
repeats: true
section:
m_annotations:
eln:
quantities:
my_parsed_quantity_2:
type: str
m_annotations:
tabular:
name: Sheet_2/Column_header_2
eln:
component: StringEditQuantity