My first KNIME node
Thought that I should combine my KNIME and development knowledge by creating my first custom KNIME node. I've created a couple of KNIME workflows for clients who uses Prophix CPM (Corporate Performance Management) software to prepare data for Prophix to import. Prophix users that is tasked to prepare data for import will probably know that date fields needs to be converted into a Prophix period format where the dates have been converted into a fiscal period format. This format is mostly in a "year M month" (yyyyMmm) for example a date of "2019/07/11" (year/month/day) will be converted to "2020M01", when the fiscal start period is July.
There has always been some logic involved to convert the dates to a fiscal year format. This is very repetitive logic to do the calculation which mean that it always have to be added to the a data preparation phase.
The developer in me has decided that enough is enough. The amount of time I've done these conversions in KNIME workflows normally using a "Java node" to write code to do the conversion and then specifying the column name and possibly fiscal year start and which format to convert to has merit some time to create my first custom KNIME node. It has been a while that I've done some programming, not taking the short KNIME Java nodes that I've written code in, it took a bit of reading through the KNIME "Developer Guide" but at the end, I've been able to create a very basic but useful node.
The node takes an input table that contains a date field, there are two settings to configure. One setting it the month of the fiscal year start and then the format that needs to be converted to. I'm still busy with the node and still need to add more formats based on what Prophix may need, but it is a start.
Looking at how the node will work. First, you would need to read the data into a KNIME workflow. Then make sure that the date field is in a proper Date format in KNIME.
Then it would be to configure the node. This will mean, specifying the month of the fiscal year start, the date field to convert and finally the format to convert to.
Currently, the period formats "M" for monthly (yyyyMmm) and "D" for days (yyyyDddd) is working. Other formats will be added later.
The final result of the output table will contain an extra column with the converted period.
Although this node isn't completed yet, and need to be worked on more to make it compliant to KNIME's requirements, it does open even more capability and options to KNIME. Now if I cannot find a node in KNIME to do what I need or have repetitive functionality that justifies encapsulating the functionality into a configurable node, I can develop a node, the opportunities are endless.
This is so cool