tFileInputXML search for ID

Five Stars

tFileInputXML search for ID

Hello,

 

I've try to use the tFileInputXML to extract a node from an xml. The xml structure I have is like the following extraction:

<catalog>

     <article>

          <id>10001</id>

          <name>AAAAXXXXAAA</name>

          <desc>LLLLLL</desc>

          ....

     </article>

     ...

</catalog>

In the tFileInputXML I have the setup the parameters like below to find a particular product by id:

 

Captura de pantalla 2018-03-27 a las 10.30.46.png

 

The problem is that my output is always 0 rows. Could you please give me some lights to check why is not working correctly?

 

Captura de pantalla 2018-03-27 a las 10.31.29.png

 

.-------------.

|#1. tLogRow_1|

+-----+-------+

| key | value |

+-----+-------+

| id  | null  |

+-----+-------+

 

Thanks in advance.


Accepted Solutions
Five Stars

Re: tFileInputXML search for ID

If someone expect the same problem where you could find the solution.

 

solution


All Replies
Moderator

Re: tFileInputXML search for ID

Hello,

Are you able to set up XML metadata for your input file to retrieve the schema in Repository?

For more information, please refer to this online document about:TalendHelpCenter:Centralizing XML file metadata.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tFileInputXML search for ID

Hello xdshi,

 

I've solved the issue with a txml map and a condition to filter by id however it takes too much time when the xml is huge (1gb). As far as I read the path solution is the fastest way to filter when xml is huge. Could you please let me know where the issue could be in my design?

 

Thanks in advance.

Moderator

Re: tFileInputXML search for ID

Hello,

From your screenshot, we see that you are using a global variable in xPath query to search for ID. Is it OK with you?

Have you tried to set up XML metadata for an input file?

In this way, the Schema Viewer area displays a preview of the XML structure. You can expand and visualize every level of the file's XML tree structure.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tFileInputXML search for ID

If someone expect the same problem where you could find the solution.

 

solution