Google Sheets append/update node confusion

Hi,

Just using the Google Sheets Writer, Updater and Appender. While I can get them working individually, I can’t wrap my head around how to deal with the concept of writing, appending, updating to the same sheet.

In my example I want to be able to run a workflow that will either export the data to a new sheet if the sheet name doesn’t exist - Appender - or overwrite and update if the sheet does exist - Updater. My intention is to dynamically create the sheet name (e.g. based on month names) that will be able to be automated, but I want to be able to “force” update an existing sheet if necessary (e.g. if I add a new column, and want to update historically).

Does anyone have a solution? I am quite new to knime, so use small words and speak slowly :slightly_smiling_face:

Thanks,
Jarrod

Hi there @McGern,

sry for a delay on this one. Have you maybe managed to find a way to deal with this?

Here is a print screen of possible solution:

Now to small words and slow speech :smiley:

Idea is to try to read sheet with Google Sheets Reader node and if successful you will use Google Sheets Updater node otherwise Appender node. If sheet is not existing Reader node will output error and that is way you should use Try/Catch sequence to continue with your workflow. I used flow variable to hold sheet name but this is not necessary but is useful for automation. Java Edit Variable (simple) node is from this workflow which you can check to get yourself familiarized with Try/Catch logic and contains logic needed for Case Switch node.

Give it a try and if any questions feel free to ask. I will upload a workflow on KNIME Hub in following days as well.

Br,
Ivan

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.