Automatic update of Workflow

Hello, I’m a new user of Knime; I’m drawing up a workflow and it works but it seems that if I update the files in the folder “data” (where I have all the sources of my workflow) the workflow is not automatically updated and i have to remove, or choose again, the source (file in folder) to update the workflow. Is there a may to maintain the import automatically updated?

Use a List Files/Folders node:
1
Configure the List Files/Folders node like this:


Configure the Reader node like this:

If you have multiple files in the folder use a loop.

1 Like

Thank you for your explanation.
I trying but with some issue; I have 5 files in the folder (4 of sources and 1 of output of Excel writer).
As first step I have 4 excel reader and when I used the List files forder as you suggest me but I’m not finding where I can choose the file linked to the first Excel reader. If I look the preview of Table row to variable I see that it’s taking in account the first file in the folder.

Then, when I will find how to select the file in List files/folder, will I use 4 of List files/folder since I have 4 excel reader?

You probably should use one reader inside a loop. Its hard to tell you more since I don’t know what else you’re doing. Can you share your workflow?

This is an image of my workflow

The 4 files of the excel reader are in the same folder, in the knime workspace so I can take them selecting File - relative to - current workfolw area.

It can be that I will update the files in different moment so i need to refresh only one or some of them

Here’s the basic structure of reading all your files with a loop. You’ll have to add any intermediate processing and an Excel Writer node after you’ve finished all processing. If you write the final Excel file to the current workflow data area you’ll need to delete or move it before your next run or it will be read too. There’s probably a way to filter it out but I haven’t given it any thought. If only one input file has changed you can still run the entire workflow. It will do no harm since it will produce an output with the old files and your one new file.

1 Like

I’m trying adding the step you suggest me, I used it in the first path but in the preview of Loop End i don’t see the lines updated in the source.

Sorry. The “numbers” in the Excel files are configured as strings. Change the configuration and it should work fine.

Ciao, I tried transalting the string in numbers but the result doesn’t change; and I would have had the same issue with the others file that contains text and not numbers.

I’m not sure what your problem is. What’s the error message? Did you write the output file to the current workflow data area and then rerun the workflow? Read my original post. I added a String to Number node and it works fine, I uploaded the revised workflow.

I used the filter in the List Files/Folders to filter out the Output file. You can now run the workflow without deleting an existing Output file. Rerunning the workflow will overwrite the Output file.

Yes, lovely, it works! Do you think i can use the same structure if I have string istead of numbers?
Then, to update the export I chose “reset” in the Loop End and then “Execute”; is it the right way?

Please mark “solved.” I’m not sure I understand your question. You now have strings in the input files which are converted to numbers for the output. If your inputs are numbers that you want to convert to strings replace String to Number node with a Number to String node. The best way to refresh the entire workflow is to reset List Files/Folders node.

Mea culpa. I had the filter in the List Files/Folders node configured incorrectly. Use this workflow.

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