HI,
For the last two years I am using Talend. Now we have started using for archiving where the requirement is to insert XML in one column some of the xml fields to other columns. I am able to insert only XML with tWriteXMLField Component but not other columns.
Destination Table:
BANK_GROUP_CODE(Varchar2) --> value in BANK_GROUP_CODE element from the below has to go here
DEAL_ID(Varchar2) --> value in DEAL_ID element from the below has to go here
REG_TIMESTAMP (date) --> value in REG_TIMESTAMP element from the below has to go here
CONTENT (XMLTYPE) --> The whole element DEAL xml will go here
INPUT XML:
<root>
<DEAL>
<BANK_GROUP_CODE>ABC</BANK_GROUP_CODE>
<DEAL_ID>253999999999</DEAL_ID>
<STEP_ID>ISS</STEP_ID>
<REG_TIMESTAMP>03-06-2010</REG_TIMESTAMP>
<CONTENT>
<BANKGROUPCODE1>SCB</BANKGROUPCODE1>
<DEALID1>253999999999</DEALID1>
<STEPID1>ISS</STEPID1>
<REGTIMESTAMP1>03-06-2010</REGTIMESTAMP1>
</CONTENT>
</DEAL>
<DEAL>
<BANK_GROUP_CODE>BCD</BANK_GROUP_CODE>
<DEAL_ID>25311111111</DEAL_ID>
<STEP_ID>000</STEP_ID>
<REG_TIMESTAMP>03-06-2010</REG_TIMESTAMP>
<CONTENT>
<BANKGROUPCODE1>SCB</BANKGROUPCODE1>
<DEALID1>253111111111</DEALID1>
<STEPID1>000</STEPID1>
<REGTIMESTAMP1>03-06-2010</REGTIMESTAMP1>
</CONTENT>
</DEAL>
</root>
Can you please guide me the components which can solve my problem.
Please let me know if need more information.
Thanks in advance.
Hi You can create metadata "File XML" and follow the wizard by importing this XML file. Then using tFileInputXml extracts all these nodes. Regards, Pedro
Hi Pedro, Thanks for your reply. My job design like the below tFileInputXm-->tWriteXMLField-->tOracleoutput To insert the xml i have used the tWriteXMLField but i am not able to retrieve other elements with this component.
Hi
Uh...Failed to generate code again.
Recently there are many people who encounters this error.
I guess this may be due to tXMLMap.
Now delete the job and recreate it.
If the error occurs again, please report it at BugTracker.
Regards,
Pedro