[resolved] using toracle row for insert into oracle table
Hi, my job is like : tfileList-->tfileinputdelimite-->tmap-->toracleoutput--->onComponentOK-->toraclerow i want use toaclerow to insert information into a oracle table : this is my query : "INSERT INTO KPI.HTTP_TRACE(NOM, NBRE_LIGNES_FICHIER , NBRE_LIGNES_TABLE , NBRE_LIGNES_INSER , NBRE_LIGNES_REJET, ENTER_DATE) values ('" + ((String)globalMap.get("tFileList_1_CURRENT_FILE")) +"',"+ ((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) +"',"+ ((Integer)globalMap.get("tOracleOutput_1_NB_LINE"))+"',"+ ((Integer)globalMap.get("tOracleOutput_1_NB_LINE_INSERTED"))+"',"+ ((Integer)globalMap.get("tOracleOutput_1_NB_LINE_REJECTED"))+"',"+ TalendDate.getCurrentDate()+ ")" when i execute i have error that missing comma, and also i have an id primary key in my table so how can i insert the value of this primary key Thanks for your help
Thanks Shong,
so my query should like this :
"INSERT INTO KPI.HTTP_TRACE(NOM, NBRE_LIGNES_FICHIER , NBRE_LIGNES_TABLE , NBRE_LIGNES_INSER , NBRE_LIGNES_REJET, ENTER_DATE)
values ('" +
((String)globalMap.get("tFileList_1_CURRENT_FILE")) +"',"+
((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) +","+
((Integer)globalMap.get("tOracleOutput_1_NB_LINE"))+","+
((Integer)globalMap.get("tOracleOutput_1_NB_LINE_INSERTED"))+","+
((Integer)globalMap.get("tOracleOutput_1_NB_LINE_REJECTED"))+","+
TalendDate.getCurrentDate()+
")"
i still have the same error missing comma
help me please
Thanks
Hi, Try following "INSERT INTO KPI.HTTP_TRACE(NOM, NBRE_LIGNES_FICHIER , NBRE_LIGNES_TABLE , NBRE_LIGNES_INSER , NBRE_LIGNES_REJET, ENTER_DATE) values (" + ((String)globalMap.get("tFileList_1_CURRENT_FILE")) +","+((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) +","+((Integer)globalMap.get("tOracleOutput_1_NB_LINE"))+","+((Integer)globalMap.get("tOracleOutput_1_NB_LINE_INSERTED"))+","+((Integer)globalMap.get("tOracleOutput_1_NB_LINE_REJECTED"))+","+TalendDate.getCurrentDate()+")" Copy paste into notepad and from notepad to your sqlrow component... Vaibhav
I copy your query But i still have the same error ORA-00917: missing comma ORA-00917: missing comma can you explain to me if my conception of job is correct the link on componentok which execute the toraclerow to insert the data into my table for each file or what help me please i don't know how can i resolve the error Thanks
Not able to visualize what you have written... but it is sure that we don't need OnComponentOk to ensure that the previous task is completed.... In place of this, we need OnSubjobOk link..
I will be more clear if you can put the screenshot of your job.
Vaibhav
This is my screen shot
i want to load into a table for each file the numbre of lines of the files and the numbre of toracleoutput insert
i copy your query but i have the error of missing comma
so is my job correct for each file can i insert the numbre of lines and nbre inserted
and is my query correct
Thanks for your great help
For tOracleRow_1 component, use anther iterate(2) link from tFileList. This insures that the first data insert operation is complete and you are starting second operation after completion of first...
How you are getting number of lines rejected? whether the Reject link is available from your output component? This link is available
- when you disable die on error
- disable batch count in advance setting
Vaibhav
i do the link iterate from tfileList to toracle row but i have the same error
this my query :
"INSERT INTO KPI.HTTP_TRACE(NOM, NBRE_LIGNES_FICHIER , NBRE_LIGNES_TABLE , NBRE_LIGNES_INSER , ENTER_DATE)
values (" +
((String)globalMap.get("tFileList_1_CURRENT_FILE")) +","+
((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) +","+
((Integer)globalMap.get("tOracleOutput_1_NB_LINE"))+","+
((Integer)globalMap.get("tOracleOutput_1_NB_LINE_REJECTED"))+","+
TalendDate.getCurrentDate()+")"
can you help me please
Thanks