One Star

Pass the properties of a file to tJava component

Hi,
I need to pass the properties of a file like file size, file MD5 value to a tJava component for future use. Currently i am using "tFileProperties" and "tJava" components for this. But i an unable to pass the properties of the file. Please advice.
Regards,
Babu.
2 REPLIES
Community Manager

Re: Pass the properties of a file to tJava component

Hello Babu
Store the file properties in global variables. eg:
tFileProperties--main---tJavaRow
|
onsubjobok
|
tJava
on tJavaRow, store the file properties into global variables: eg:
globalMap.put("size", input_row.size);
on tJava, use the file properties like:
Long size=(Long)globalMap.get("size");
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

Re: Pass the properties of a file to tJava component

Hi,
I have one file in repository, I need output all available data in this file along with file properties for all rows.
Please advise.
Regards,
DSR