Icon

Challenge 15 - Extracting a Table from a PDF - Solution

Extracting a Table from a PDF

Given a text-based PDF document with a table, can you partially extract the table into a KNIME data table for further analysis? For this challenge we will extract the table from https://www.mountwashington.org/uploads/forms/2021/10.pdf and attempt to partially reconstruct it within KNIME. The corresponding KNIME table should contain the following columns: Day, Max, Min, Norm, Depart, Heat, and Cool. Note 1: Your final output should be a table, not a single row with all the relevant data. Note 2: The Tika Parser node is better suited for this task than the PDF Parser node. We completed this task without components, regular expressions, or code-snippet nodes. In fact, our solution has a total of 10 nodes, but labeling the columns required a bit of manual effort.

Challenge 15 - Extracting a Table from a PDFGiven a text-based PDF document with a table, can you partially extract the table into a KNIME data table for further analysis? For this challenge we will extract the table from https://www.mountwashington.org/uploads/forms/2021/10.pdf and attempt to partially reconstruct it within KNIME. The corresponding KNIME table should contain the following columns: Day, Max, Min, Norm, Depart, Heat, and Cool. Note 1: Your final output should be a table, not a single row with all the relevant data. Note 2: The Tika Parser node is better suited for this task than the PDF Parser node. We completed this task without components, regular expressions, or code-snippet nodes. In fact, our solution has a total of 10 nodes, but labeling the columns required a bit of manual effort.
columns to rows
Table Transposer
remove non-target columns
Column Filter
split by space
Cell Splitter
copy paste the column name and column typefrom Extract Table Spec to change names
Table Creator
extract current column names
Extract Table Spec
data from:https://www.mountwashington.org/uploads/forms/2021/10.pdf
Tika Parser
separate allnew lines
Cell Splitter
reset row ids
RowID
fix column names
Column Renamer (Dictionary)
filter by new row ids to target data
Row Filter

Nodes

Extensions

Links