CSV writter Error

Hi Team,

I am using CSV writer node to write file to my machine. I have selected the overwrite option if there is an existing file.

the same file sometimes is opened by another process where I get the
The process cannot access the file because it is being used by another process. error.

Is there any workaround to avoid this error?

Thank you.
Srinivas

Hello @ShinagdeS,

but what do you expect when you say workaround?

Br,
Ivan

Hi @ipazin ,

I mean is there any way to avoid this error ?

Thanks,
Srinivas

Hello @ShinagdeS,

but does avoiding means writing data into CSV file or ignoring error and continuing with execution?

Br,
Ivan

Hi @ipazin ,

I want to forcefully write data into CSV, even if the file is opened by another process, and continue with the execution.

Thanks,
Srinivas

Hello @ShinagdeS,

CSV Writer does not have this possibility. You can either put writer node within Try/Catch loop within generic loop (see here) and wait while you or someone else closes file either use scripting nodes (for example Java Snippet node) to force closing. Latter option might not be good as someone might lose his work if you force closing.

But who or rather which process also opens file you are writing to? And where is the location of this file?

Br,
Ivan

1 Like

Hi @ipazin ,

yeah, the loop option looks good to me.

If I have to make the other process to stop reading the file, that would have also worked for me. I don’t know how to do that.

We have a tableau dashboard that reads from this file. Location is our knime server.

Thanks,
Srinivas

Hello @ShinagdeS,

I see. But before you go implementing can you tell me which other process is accessing your file(s)? Is it another person or workflow or? And how long goes by between writing and overwriting file?

Br,
Ivan

1 Like

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