Hello @aw15281,
and welcome to KNIME Community!
Check out this topic as well as it might have example you can use:
Also there is existing ticket to have this functionality inside KNIME so added +1 for you. (Internal reference: AP-5966). Upon news someone will update this topic to notify you.
Br, Ivan