Skip to content
Content
- This tutorial shows how data can imported into FoodChain-Lab without using the Excel templates.
- Therefore the external data has to read into KNIME tables.
- KNIME provides a multitude of reader nodes for various data formats (e.g. csv, SQL databases, …).
- Here we just show which tables are needed by FoodChain-Lab and which columns they must contain. To do so the we have created these tables with Table Creator nodes.
1
2
- FoodChain-Lab needs three tables to perform a tracing analysis: Stations, Deliveries and Delivery Relations.
- The Table Creator nodes on the left show all mandatory columns for these three tables.
3
- Double click on the Table Creator for the Stations table to open its dialog.
4
- As you can see the only mandatory column in the Stations table is the column ID of type string.
5
- Double click on the Table Creator for the Deliveries table to open its dialog.
6
- The Deliveries table has three mandatory columns: ID, from and to (all of type string)
- The from and to columns contain the source station and target station IDs.
7
- Double click on the Table Creator for the Delivery Relations table to open its dialog.
8
- The Delivery Relations table has the columns from and to of type string.
- These columns contain IDs from the Delivery table and are meant to connect two deliveries.
- The from-delivery is a part/ingredient of the to-delivery. A contamination can spread from “from” to “to“.
9
- Now we will look the Table Creator nodes on the right which show the optional columns for the three tables.
10
- Double click on the Table Creator for the Stations table to open its dialog.
11
- The optional columns for the Stations table are Address, Country, Latitude and Longitude.
- Latitude and Longitude are used for the geographical visualization in the Tracing View and Address and Country can be used for geocoding, if Latitude and Longitude are not known yet.
- Any other arbitrary columns of this table can also be used in the Tracing View for highlighting etc.
12
- The Geocoding node in the upper right corner shows how Address and Country can be used for geocoding to compute Latitude and Longitude.
13
- Double click on the Table Creator for the Deliveries table to open its dialog.
14
- The optional columns are Date Delivery, Date Delivery Arrival, Lot ID, Amount and Amount Unit.
- The date columns are of type string and in YYYY-MM-DD format. They used for computing cross contamination.
- If the Lot ID column (of type string) is provided, lot-based scores are computed.
- The amount columns are just used for plausibility checks.
- Any other arbitrary columns of this table can also be used in the Tracing View for highlighting etc.
15
- Double click on the Table Creator for the Deliveries Relations table to open its dialog.
16
- The Delivery Relations table does not have any optional columns.
- All columns other than from and to are ignored.