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

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.