Solved

Write to a already existing text file in LocalFS


I have a text file in my “/tmp” directory named “data.txt”

Now every time when I run the pipeline, I want to write data to the same file.

I was trying to use LocalFS but I couldnt find anyway wherein I could append data to the same file.

Can anyone help me out with this?

icon

Best answer by Bikram 25 May 2023, 10:10

View original

4 replies

@Bikram  Thank you so much for the help !!

Userlevel 4
Badge +1

@lex03 

Please find attached the pipeline for your issues.

 

 

 

@Bikram Thank you !!

I was trying out what you suggested me but im getting an error saying that its returning non-zero.

ie Error : “SHELL_003 - Script return non-zero value: 1”

This is the pipeline that I’m trying to get running.

 

 

Can you please correct me where I’m going wrong !! 

Userlevel 4
Badge +1

@lex03 

Appending is not possible by using local FS as destination but you can append the data to the existing file by using shell processor as your destination.

 

Kindly use shell as your destination and use mv command in it to append data into the existing file.

Reply