Parsing instructions
This doc describes the parsing/import instructions used in the google sheet tables meant to be imported to inkVisitor DDB1.
The instructions were mostly improvised in the conversations between DZ and TH, they changed a lot during the development of the inkVisitor data model and parsing. E.g. the system and terminology probably are far from ideal. Sorry for that. :)
Basics
The first four rows of the google sheet table (designated for parsing+import to inkVisitor DDB1) form the parsing header.
The foundational part of import instructions parsing instruction keywords (e.g. discard, inside, ...), sitting in the 4th row.
The rows are:
- comment
row- anything can be here, it is forhumanshumans, mostly used for definition of the "special" instruction - target variable
row,- for parameters of relational instructions, (e.g. "id") - target type
row,- for parameters of relational instructions (e.g. "R0002") - parsing keyword (e.g. "referece_part")
,- primary information on what to do with the column data - the label /name of the column
Generally, there are three types of instructions
- simple, they do not need other parameters (e.g. inside, discard)
- relational, they specify relational data and need other parameters (e.g. propvalue, relation)
- special, they are specified in natural language in the comment row
Here are all possible keywords:
simple | inside, discard, hooked-inside |
relational | relation, reference_part, propvalue, proptype, proptype_2nd, propvalue_2nd, hooked-relation |
special | special |
All columns in the table meant for parsing and import should have an instruction header!
Meaning of the parsing instruction keywords
Simple
inside | the content in the column is meant to be directly in the entity objects, e.g. for columns like "label" or "note" |
discard | the content in the column is just ignored |
hooked-inside | the content in the column is meant to be part of some "embedded object", which is always defined by the preceding special column |
Relational
relation | |
reference_part | |
propvalue | |
proptype | |
proptype_2nd | |
propvalue_2nd | |
hooked-relation |
Special
special |