Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have one requirement I have different source like csv or xml or excel it may not be know to us always the source will keep on changing and schema also varies. in this case how can i handle the file to insert the records in database which is having fixed schema . by using Talend open studio for data integration.
waiting for your reply
Regards
rekha
Hi,
1) Use tFileList Component --> tIterateToFlow --> tSetGlobal (Here u just set the Parameter's of tFileList like FileName,FileCurrentPath & ((String)globalMap.get("tFileList_1_CURRENT_FILEEXTENSION"))
2) In 2nd Sub-Job Create 3-different Sub-Job Flow's which can Handle the 3-different FileTypes.
3) Connect the tSetGlobal Component to Each one of the 3-Flows Separately with Trigger --> RunIf Condition's
tSetGlobal_1 --> If(Order 1) [Set Condition in if as ((String)globalMap.get("tFileList_1_CURRENT_FILEEXTENSION")) == "xlsx"
tSetGlobal_1 --> If(Order 2) [Set Condition in if as ((String)globalMap.get("tFileList_1_CURRENT_FILEEXTENSION")) == "csv"
tSetGlobal_1 --> If(Order 3) [Set Condition in if as ((String)globalMap.get("tFileList_1_CURRENT_FILEEXTENSION")) == "xml"
4) So whenever tFileList Found the FileExtension Type (csv,xlsx or xml) then it will execute that particular sub-job.
I hope this will help you.
Thanks,
skh