Skip to main content
Solved

Write to a already existing text file in LocalFS


lex03
Discovered Fame

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?

Best answer by Bikram

@lex03 

Please find attached the pipeline for your issues.

 

 

View original
Did this topic help you find an answer to your question?

Bikram
Headliner
Forum|alt.badge.img+1
  • Headliner
  • May 24, 2023

@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.


lex03
Discovered Fame
  • Discovered Fame
  • May 25, 2023

 

@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 !! 


Bikram
Headliner
Forum|alt.badge.img+1
  • Headliner
  • May 25, 2023

@lex03 

Please find attached the pipeline for your issues.

 

 


lex03
Discovered Fame
  • Discovered Fame
  • May 26, 2023

@Bikram  Thank you so much for the help !!


Reply