[resolved] HOW TO - tFileOutputDelimited Configuration

Five Stars

[resolved] HOW TO - tFileOutputDelimited Configuration

Hi all,
I have a tFileOutputDelimited component in my Job, 
so in the "Basic settings" windows; like file name, 
i put "C:/TalendFtpToCustomerFtp/Comgest/DonneesPermanentes_CSA"+"_"+TalendDate.getDate("YYYY-MM-DD")+".csv"
And everything work right, but i put the same name in a context and i get this error

Démarrage du job ComgestPermData a 16:59 14/01/2015.
connecting to socket on port 3903
connected
Exception in component tFileOutputDelimited_2
java.io.FileNotFoundException: C:\TalendFtpToCustomerFtp\Comgest\DonneesPermanentes_CSA"+"_"+TalendDate.getDate("YYYY-MM-DD")+".csv (La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
at myspherescustomerdelivery.comgestpermdata_0_1.ComgestPermData.tFileInputDelimited_2Process(ComgestPermData.java:7621)
at myspherescustomerdelivery.comgestpermdata_0_1.ComgestPermData.tFileList_1Process(ComgestPermData.java:1345)
at myspherescustomerdelivery.comgestpermdata_0_1.ComgestPermData.tFTPGet_1Process(ComgestPermData.java:1158)
at myspherescustomerdelivery.comgestpermdata_0_1.ComgestPermData.tFTPConnection_1Process(ComgestPermData.java:823)
at myspherescustomerdelivery.comgestpermdata_0_1.ComgestPermData.runJobInTOS(ComgestPermData.java:12561)
at myspherescustomerdelivery.comgestpermdata_0_1.ComgestPermData.main(ComgestPermData.java:12319)
disconnected
Job ComgestPermData terminé à 16:59 14/01/2015.

May somebody help me please?
And i want to precise that i have also test this way like name:
""C:/TalendFtpToCustomerFtp/Comgest/DonneesPermanentes_CSA"+"_"+TalendDate.getDate("YYYY-MM-DD")+".csv""

Thanks you,
Moderator

Re: [resolved] HOW TO - tFileOutputDelimited Configuration

Hi,
You can set  directory  C:/TalendFtpToCustomerFtp/Comgest/DonneesPermanentes_CSA as Context value.
Such as: context.path+"/"+TalendDate.getDate("yyyyMMddHHmmssSSSSSS")+".csv". Feel free to let us know if it is Ok with you.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: [resolved] HOW TO - tFileOutputDelimited Configuration

Hi,
Yes it works, but this change the name of my file. i want to get like name:
DonneesPermanentes_CSA_20150120.csv
Thanks,
 
One Star

Re: [resolved] HOW TO - tFileOutputDelimited Configuration

Well, you have to do what xdshi said, but just a little bit different : 
context.path+"_"+TalendDate.getDate("YYYYMMDD")+".csv"

Code tested, working fine.
Five Stars

Re: [resolved] HOW TO - tFileOutputDelimited Configuration

Hi all,
Yes everything work fine.
Thanks you very much.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads