Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Solved Truncate a file before a loop

More
10 Dec 2015 12:49 - 10 Dec 2015 15:21 #1 by Josserand BRINON
Truncate a file before a loop was created by Josserand BRINON
Hi,

I would like to know what is the best way to truncate a flat file before integrating data.
I cannot use the "Truncate Target File" from the template, because the mapping is used in a loop.

I have tried to use a "Write a file" with no text in it, before the loop.



It nearly works... The problem is that an empty line is written at the beginning of the file, and data starts on the second line.

Thanks.
Attachments:
Last edit: 10 Dec 2015 15:21 by Josserand BRINON.
More
10 Dec 2015 14:52 #2 by Cyril Dussud
Replied by Cyril Dussud on topic Truncate a file before a loop
Hi,

Have you tried to change the template parameters of your mapping ?
You should have a File Separator parameter to change this behavior:



Try to set it to after.
Attachments:
More
10 Dec 2015 15:20 #3 by Josserand BRINON
Replied by Josserand BRINON on topic Truncate a file before a loop
Perfect, it works :)
Thank you!