The Lookup From Table Component can be used to convert from different tables that parsed as a CSV.
CSV Table: The CSV is entered on the Credentials page as a list of separated items. Any delimiter is supported. The CSV will be parsed using the first row as a header for each column below it. The CSV must be able to be interpreted as a rectangle, i.e. it cannot be missing values.
For example,
English,Abbreviated,German
male,M,männlich
female,F,weiblich
other,O,divers
unknown,U,unbekannt
Will parse as
| English | Abbreviated | German |
|---|---|---|
| male | M | männlich |
| female | F | weiblich |
| other | O | divers |
| unknown | U | unbekannt |
and
English,Abbreviated,German
male,M,männlich
,F,weiblich
other,,
unknown,U,unbekannt
Will parse correctly as
| English | Abbreviated | German |
|---|---|---|
| male | M | männlich |
| F | weiblich | |
| other | ||
| unknown | U | unbekannt |
(though this may not be useful), but
English,Abbreviated,German
male,M,männlich
F,weiblich
other
unknown,U,unbekannt
will provide a failed result.
The CSV can only be a maximum of 5kB.
None yet.
The lookup from table action takes a table to lookup from, a table to translate to, and an input value to translate. It returns an object in the form {result: value} where the value is the result of the table lookup, if it exists:
Input Configuration
Emit empty object on unsuccessful lookup: if selected, an empty object{}will be emitted given an unsuccessful lookup where nothing is found. If not selected, an error will be thrown on unsuccessful lookupFrom this column: the column to translate fromTo this column: the column to translate toDuplicates behavior: How to handle cases when found several records in selectedFrom this columnin provided table, options:Emit all mach individually- Will emit each record as separate messageEmit all mach as Array- Will emit all founded records as array of stringsEmit first found- Will emit first founded recordThrow an error (Default)- By default error will be thrown
Input: the value to translate. Should be selected from the list of available values underValues
- if lookup is successful, an object of the type
{"result": "value"}will be emitted - if lookup is unsuccessful and emitting empty object,
{}will be emitted - if lookup is unsuccessful and not emitting an empty object, and error will be emitted
- Any elements of the CSV that contain the delimiter in them should be wrapped in
"double quotes". Any elements of the CSV that contain the delimiter and also quotations should have the quotes backspaced.
e.g.
Full Name,First,Last
"Bond,James",James,Bond
"Johnson, Dwayne \"The Rock\"",Dwayne,Johnson
- If you want to mark an element as a string (e.g. "5" or "Some text inside a single element"), you must use
", not', because'is considered as an additional character. So in this case: 2 is the same as "2", but '2' would be equal to "'2'".
- the CSV has a max size of 5kB
- the CSV must be able to be parsed as a rectangle