I am attempting to unpivot COVID-19 data in Knime with the Unpivoting Node. The data available from Johns Hopkins at https://github.com/CSSEGISandData/COVID-19 is wide format where each new day of data is added as a new column.
I can manually make the columns with daily data be rows with the Unpivoting Node. However, each day I must reconfigure the node to account for the new column. There are 5 unpivoting nodes in my workflow where this must be done.
The Unpivoting Node has an option to use Regex to detect the columns to include or exclude but I am unable to make it work.
The available columns to include/exclude are a handful of field names such as Province/State, Country/Region, Lat, Long, plus the long list of date columns of the format m/d/yy
(or m/dd/yy
if later in the month). The Johns Hopkins data for the US is similar format but with additional columns for counties, iso codes, etc.
All of the date columns are this year (i.e. 2020).
- For the top part of the Unpivoting node where Value Columns are
specified, I can do what I need by using the Wildcard setting and the
pattern
*/*/20
- For the bottom part of the Unpivoting node, I need a wildcard or Regex expression to specify all the other columns.
All the other columns include alphabet characters. None are of the format m/d/yy.
Therefore, some sort of Regex that includes any column with alphabetical column names, or specifies NOT m/d/yy
should do the trick.
I tried using [\s\S]+
for help writing the Regex but nothing seems to work. I appreciate any help.