#1 2012-04-24 10:25:25

umeshrakhe
Member
Registered: 2011-03-14
Posts: 155

File Created With No Name

Hi
i have job which get vendor numbers from SQL tables. after that we are creating a file for each vendor number. files created successfully but some of files has no name. even it is not created for last or first file it is created in the middle of vendor numbers.

Job Design:
SQLInput--->Tflowtoitrate---->SQLInput------tFileoutPut


please suggest.


Skype: macwintuch

Offline

#2 2012-04-24 10:55:25

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: File Created With No Name

Hi

Could you show us the schema of SQLInput and 'File Name' on tFileOutputDelimited?

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-04-24 14:01:18

umeshrakhe
Member
Registered: 2011-03-14
Posts: 155

Re: File Created With No Name

Hi Pedro,
due to some restriction i can not show exact schema but here is deep explanation it.

SQLInput--->Tflowtoitrate---->SQLInput------tFileoutPut

in Tflowtoitrate we are storing value of vendor number (all integer values) in the variable vVendorNumber
which is latter upended to tFileOutputDelimited file path.

file is created with proper data but name is not there.

file names looks like
10110.txt
10101.txt
10102.txt
         .txt
11212.txt
so on


Skype: macwintuch

Offline

#4 2012-04-24 15:02:19

shong
Talend team
Registered: 2007-08-29
Posts: 10310
Website

Re: File Created With No Name

Hi
Don't know how do you set the file name of tFileoutput, according to your description, it should be a dynamic file path here, for example:
SQLInput--row1->Tflowtoitrate---itereat ->SQLInput---row2---tFileoutPut
"D:/file/"+(Integer)globalMap.get("row1.vendor")+".txt"

//vendor is one of the column name on SQLInput.

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#5 2012-04-25 06:08:49

umeshrakhe
Member
Registered: 2011-03-14
Posts: 155

Re: File Created With No Name

Hi
Exactly i am setting file path in same way. but still producing a no name file.


Skype: macwintuch

Offline

#6 2012-04-25 06:23:16

shong
Talend team
Registered: 2007-08-29
Posts: 10310
Website

Re: File Created With No Name

Hi
I think here is a empty value from the table, that's why you get a file name looks like:
        .txt

For debug, add a tJava component and print the global variable before using it. for example:
SQLInput--row1->Tflowtoitrate---itereat ->tJava--oncomponent-->SQLInput---row2---tFileoutPut

on tJava:
System.out.println("The value of vendor column is:"+(Integer)globalMap.get("row1.vendor"));

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

Board footer

Powered by FluxBB