Error when loading XML data from REST service

Mohammad8
Kilo Expert

I have a custom table to which I want to load data from REST API (from 3rd party). I did the following but it didn't work:

1. I created a Data Source (System Import Sets -> Data Source)

2. I created a Transform Map to the data source which I created in the previous step

3. I added Field Maps for in the transform map which I created in the previous step

4. I went back to the data source and selected "Test Load 20 Records"

I got the following error:

 

com.glide.db.impex.datasource.DataSourceException: Unable to parse ids1f605b32db2563002c005a6adc961981.tmp

 

There are 3 weird things that are worth mentioning:

1. When I created the data source, I understood that the Import Set table should be created automatically, but I think it wasn't because when I take the name of the table and add ".do" to it in the Filter Navigator, it tries to search for it but it doesn't find it.

2. When I tried to create the Transform Map, I was supposed to find the link (Auto map matching fields) in the related lists according to this article Create a transform map, but I couldn't find it and I couldn't add it using the Configure menu.

3. When I tried to add the Field Maps, it asked me to select both the source table and the target table. I selected them, then I wanted to select the source field but the drop down list was empty.

1 ACCEPTED SOLUTION

My apologies Mohammad, I did not realise that was the issue you were facing. I don't have the same problem in my environment, by default Path for each field is displayed when you select type JSON. If you check in a Personal Developers Instance you can see how it behaves without any customisations.

First, you will need to check to see if Path for each row is added to the Data Source Form Configure > Form Layout > Add Path for each row under XPath for each row:

find_real_file.png

Next, please check the UI Policies, Configure > UI Policies. There is a Policy called Format == JSON which makes the jpath_root_node (Path for each row) field visible and mandatory when the format is of type JSON. Make sure this Policy is active and that are not other policies making this field invisible.

 

View solution in original post

13 REPLIES 13

Hi Joel,

No need to apologies. In fact, I need to thank you for helping me and for your patience.

I finally managed to show this field and I overcame that error.

I still couldn't import the data but I'll mark your answer as correct and I'll open another thread for the new error.

Thanks

Hi Mohammad,

You are most welcome. I appreciate the feedback and you marking my answer as correct!  Hopefully we can get your other error fixed in the new thread.

Regards,

Joel.

I spent way too long because for some reason our Dev instance does not reveal the 'Path for each row' when JSON type is selected. Instead I tried following other advice from articles and I manually added the XPath field to my form and fought for hours with the same 'Unexpected " as the OP. Thank goodness I stumbled on your post where I saw both fields in the slushy with the correct one highlighted and it dawned on me. UGH!!  Kudos!

I'm glad such an old post is still helping people! It's funny coming back to some of this stuff as it was so long ago, I don't even remember writing it some of the time!