- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Loading only one csv file each time to sql server (using procedured as attached)
I am using the procedure as attached for load more than one csv file to sql server it is working only for one file of the directory. If I include two files for example in tFixedFlowInput (file_name x table_name) the job seams that it is not identify that exist more than one.
Could you help me where is the change that I need to do please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
What you do on tMap? From your job design, I see tFileInputDelimited only run one time, can you please share a screenshot of tMap and tJavaRow? To iterate each file, replace tIterateToFlow with iterate+tFixedFlowInput
tFileList--iterate--tFixedFlowInput---main--tMap......
Regards
Shong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, thanks by reply.
I am using the the same example of Talend site (Using Dynamic Schema to load data dynamically to database tables) and the link is as below. https://help.talend.com/r/36FNvH4mND6uL3cKKzTU~w/0niQWjT7eQkj_0HLp57YUA
The difference for my project is that I am not using Child Job for the components tFileInputDelimited and tDBOutput , I created all process in one simple job.
Please let me know if you need some information of my job or the project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, you have to do an iteration for each file after your tJavaRow.
Send me love and Kudos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, my JavaRow is below and the process in atached. Please, what component need I to use after the JavaRow?
context.tablename = out.tablename;
context.filename = out.filename;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I got to change with child job and worked.
Please, how can I cut the last some characteres from the csv file?
For example, I have the file name DALUNOS_RH_20211222 and I´d like to keep only DALUNOS_RH?
I tried something like below but in the message box show me ever DALUNOS_RH_202
((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0,((String)globalMap.get("tFileList_1_CURRENT_FILE")).length() - 9)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
for iteration : tFlowtoIterate.
for the file name : ((String)globalMap.get("tFileList_1_CURRENT_FILE")).replaceAll("_\\d{8}","")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello please, confirm it for me:
Actual: DALUNOS_RH_20211222.CSV
To be: DALUNOS_RH.CSV
How can I to use the command below but keeping the extension .CSV?
((String)globalMap.get("tFileList_1_CURRENT_FILE")).replaceAll("_\\d{13}","")