I am trying to find a way to get the data within a unreset workflow, Namely data in an Excel Reader Node.
While it is possible to just use ctrl+c there were two problems that I was facing
- too many rows to copy (it has more than 700,000 rows)
- getting ‘?’ in place of null values
Please let me know if there is a way to get the underlying data of a unreset workflow.
I guess you got from somewhere a workflow that is executed but the file read using the -Excel Reader- node is not anymore in a local directory under the workflow or it is not any more accessible from the original directory from where it was read.
In such cases, I usually add to the workflow an -Excel Writer- node making sure that the data is written exactly in the same way as it was read but this time I write it locally under the workflow directory in the data folder as follows:
20220716 Pikairos How to get data from Unreset workflow.knwf (60.7 KB)
Once the data is written locally in the workflow, I can then read it and execute again the rest of the workflow without problem. I duplicated the workflow in the example above just to illustrate how to proceed but obviously, this is not eventually needed.
Hope it helps.
Hello @aworker ,
Thank you for your reply.
I guess I forgot to mention the excel reader is inside a loop, so I can’t use a excel writer to modify changes.
Update: It seems I can find the underlying file but it is in .bin format and I am not able to read it.
When I open it with notepad , I am getting like this "‚SNAPPY “!€€ði Row0#0a‚”
Would it be possible to share your workflow if the data is not confidential ?
Hello @aworker ,
Sorry I don’t think I will be able to provide the unreset workflow as it was provided by client and the workflow itself is more than 2GB
Hi @berserkersap , it looks like it’s a binary file. The Excel Reader read the bin file? It’s probably an excel file renamed as .bin (An excel file would also be a binary file).
The bin files can not be read. At least i never heard of this.
Could you reach out to your client and ask for the original file?
Thanks for your reply.
I guess that would be my last option
Hello @bruno29a ,
I am not saying excel writer read the .bin file. I think the underlying excel reader node data is being kept in a .bin file (I guess that’s how KNIME works).
You can also check the files & folders that KNIME creates in your workspace according to the workflow.
I fully understand. Maybe there is still hope even if your -Excel Reader- node is within a loop. Could you please try the following two options, 1) first and if it doesn’t work then 2) one:
- As shown in the snapshot, you could just connect an extra -Excel Writer- node to the output of your current -Excel Reader- node and execute it. When I do that as in my example, I still can execute the -Excel Writer- node and recover in an Excel file the last loop excel reading, as shown in the snapshot below:
- If the above solution doesn’t work for you, then another possibility (a hack in this case ) is as follows:
- Copy and paste your -Excel Reader- node as shown in the following snapshot:
As you can see from the snapshot above, I’m displaying the node number which is (#14) instead of (#6) for the new -Excel Writer- node. Obviously this one is NOT executed.
Save the workflow and close it in KNIME.
Go to the directory that contains the workflow. You can find its location from the Local Path option as shown below:
- Go to this directory and get into your workflow. In my case, it is as follows:
You should see two -Excel Reader- folders, with different numbering, in my case (#6) and (#14). The numbers would differ in your case from the ones I’m showing here.
- Copy the content of the one with lowest numbering to the one with highest numbering, or in other words, copy the content from the original one to the new one, as follows:
So these subfolders and file should be copied in my case under directory called “Excel Reader (#14)”. I do not know what folder number (#??) should be in your case:
- Open the workflow in the KNIME editor again. You should get the following warning message:
but it is irrelevant. Just click on OK.
Now the -Exec Reader- node should appear as executed and with the content that was read when the loop was fully executed, as follows:
At this stage, one should be able to read the content of the last information read by the -Excel Reader- node as it was read in your loop. If I understood well, this is your final aim.
Please be aware that if your loop is reading a different Excel sheet at every loop iteration, then the only sheet that can be recovered is the last one that was read. Otherwise, if there is only one sheet read from your Excel file and always the same, then this is the one you should be able to recover.
Hope one of these two options works for you although I fear that your Excel file was made of more than one excel sheet and this is why it is within a loop. Hope it is not the case.
Please reach out for further help if needed.
Could you recover your Excel file with one of the two previously suggested solutions ? I would appreciate your feedback on this issue
Hello @aworker ,
Sorry for the late reply. The first solution didn’t work but the second solution worked like a charm!
Thank you very much for that hack.
However, it is very unfortunate that different sheets are being read in different loop iterations. So I could only get the data from the last iteration. In the end we are asking the client for the source files.
But, this is a really good find. A new thing to learn
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.