Tuesday, September 29, 2015

Save File data to cache memory using tFileFetch in Talend

In tFileFetch select the Use cache to save the resource check box to add your file data to the cache memory. This option allows you to use the streaming mode to transfer the data. In this case you don’t need provide destination filename and location. You can use ((java.io.InputStream)globalMap.get("tFileFetch_1_INPUT_STREAM")) variable to access the file data.
https://help.talend.com/download/attachments/9311144/Use_Case_tFileInputDelimited2_2.png?version=1&modificationDate=1355444870000&api=v2
For example, my tFileInputDelimited component uses a tFileFetch as its source and the File name/Stream field looks like this. Similar way use can use for any file format such as XML, JSON.
((java.io.InputStream)globalMap.get("tFileFetch_1_INPUT_STREAM"))
https://help.talend.com/download/attachments/9311144/Use_Case_tFileInputDelimited2_3.png?version=1&modificationDate=1355444871000&api=v2

Cheers!
Uma

1 comment:

  1. I have a folder with 10 csv files. how can I read them one by one and get them uploaded to data lake using tFileFetch component

    ReplyDelete