0

Hi informatica developers,

I am working on a XML-based REST API. I want to get the data from the API and save it to a flat file.

However, one problem is that this API is returning the object whose first character starts with number but not letters. Below is an example response from the API:

<sg_response>
<sgscore>
    <scores>
        <score>
            <period>2022-07</period>
            <score>650</score>
            <min>405</min>
            <25th>585</25th>
            <50th>660</50th>
            <75th>710</75th>
            <max>830</max>
        </score>

So when I create the mapping, I got this error: enter image description here

Hence, I modified the output fields, I added a 'p' in front of the column name: enter image description here

Which mapped back to the API response like this: enter image description here

However this cannot solve the problem, when I run the mapping I got this error:

[FATAL] Service Info not found for the service 'WebServices_h2r_udt_1i5fk_ONLY_H2R_XMAP_H2R - 4 m.contains.i0.contains.i3 Map: './25th' is not a valid XPath. (Invalid literal found: 25th [err:XPST0003]).- for more information see file://D:/SecureAgent/apps/Data_Integration_Server/data/CMReports/Tmp/2023-07-04/CmInternal_ServiceValidator_A7d55926e-5699-4473-aee4-7829973da881/Events.cme <log_file>D:/SecureAgent/apps/Data_Integration_Server/data/CMReports/Tmp/2023

Based on the error I guess the problem should be caused by the 25th, 50th, 75th issue, because in the error it says "'./25th' is not a valid XPath. (Invalid literal found: 25th [err:XPST0003]"

Do you have any ideas as how to solve the problem? Have you encountered with an API who returns the first character as a number but not a letter? Do you know how to modify the XPath? Thank you so much for your help!

La. Li
  • 41
  • 6

1 Answers1

0

to whom who has similar questions, I have contacted Informatica support, and they says that this function is just disallowed. They have created a change request to add this function in the future.

For now, if really need to do this task, one has to use Java transformation and intelligent parser to achieve this.

La. Li
  • 41
  • 6