Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have this setup :
the schema for twriteXMLField looks like this :
The goal is to pass the column Value as an additional column of the output schema of the tWriteXMLField component.
This does not happen. The column Value is not passed.
Even when using a tMap after the tWriteXMLField and do a globalMap.get("row1.Value") allso gives null.
But in the XML document, the Value collumn is used and the contents is visable.
What am I doing wrong ??
Jacco
Hey Jacco,
I know your screenshot shows the Value column being explicitly defined in the input and output schema in the Studio UI, can you also make sure you are mapping the column in the XML editor of the component as well? This is a manual mapping step inside the component's internal editor.
tWriteXMLField Standard properties:
https://help.qlik.com/talend/en-US/components/8.0/xml/twritexmlfield#anchor-2
Open the tWriteXMLField settings, click 'Configure XML Tree', and drag the Value column from the input side to the output side.
This is the standard way to 'pass through' the columns in this component. If you haven't done this yet, then the Value column won't be properly incorporated into the XML structure, even though it exists in the schemas. The XML tree mapping is what actually defines how input data becomes XML content, the schema alone isn't sufficient.
This is what we should focus on first.
Respectfully,
Qlik Support
Hi David,
Thanks for your response and sorry for my late reaction.
I have incoorperated this in a larger example. I retrieve data from a database with a query. Pass this data to XMLMap and create the XML structure. This works.
The picture below shows the collapsed XML structure and your suggestion to map a single column.
The column TerminalFilePrefix is mapped with a variable that has a expression in order to fill the value.
When I look to the output of the XMLMapper with a tLog, the column is filled with the right value.
.------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------.
| |
|=----------------------------------------------------------------------------------------------------------------------------------+-----------------=|
|Invoice |TerminalFilePrefix|
|=----------------------------------------------------------------------------------------------------------------------------------+-----------------=|
|<?xml version="1.0" encoding="UTF-8"?>
<DATA><INVOICE><COMPANY/><DEBTOR>000099999</DEBTOR><EM/><ITEMCODE>B</ITEMCODE>INE><CTINVOICE>BI/0000158</CTINVOICE></INVOICE></DATA>|VTT |
'-----------------------------------------------------------------------------------------------------------------------------------+------------------'
The XML is shortend.
But how do I use this value in the cloumn TerminalFilePrefix in the tFileOutputXML component ?
note: the value of row1.invoicenumber can be used
But the value of row3.TerminalFilePrefix is null eventhough tLogRow_2 shows an acutal value