xpath - Qlikview REST connector pagination namespaced XML -


we have xml file on somewebsite , looks in way (confidential parts stripped)

<?xml version="1.0" encoding="utf-8" standalone="yes"?>   <feed xml:base="https://somewebsite.com/crm/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/atom">     <title type="text">accounts</title>     <id></id>     <updated>2016-02-04t08:36:56z</updated>     <link rel="self" title="accounts" href="accounts" />   <entry>       <title type="text"></title>       <updated>2016-02-04t08:36:56z</updated>       <author>         <name />       </author>       <content type="application/xml">         <m:properties>           <d:type>a</d:type>           <d:uniquetaxpayerreference m:null="true" />           <d:vatliability m:null="true" />           <d:vatnumber m:null="true" />           <d:website m:null="true" />         </m:properties>       </content>     </entry>     <link rel="next" href="https://somewebsite.com/accounts?$skiptoken=guid'ee6bc390-a8ac-4bbd-8a4d-0a1f04ab9bd3'" />   </feed>   

we use new rest connector data out of xml file. xml has pagination , every 60 entries can load next 60 link @ bottom of xml file.

the problem have when, in rest connector, want enable pagination these setting:

pagination type: next url

next url field path:

/*[name()="feed"]/*[name()="link"][contains(@rel,"next")]/@href 

it doesn't seem work...

side note: xml file has namespaces need target elements way instead of /feed/link/...

i'm using xpath syntax target link href, maybe not way go? or maybe rest connector isn't using xpath syntax?

really hope can me!

actually turns out seems due "bug" in "qlik rest connector 1.0" pagination doesn't work.

but there fix it:

1) make sure qlik rest connector 1.0 connect dialog box has nexturl set to:

      feed/link/attr:href 

2) when sql has been generated after using select-button , going through wizard have modify sub-select reads this:

.....

(select   "attr:rel" "rel",   "attr:title" "title",   "attr:href" href,   "__fk_link"   "link" fk "__fk_link"),   .....   

on line 05 have remove text href.

so should this:

.....   (select   "attr:rel" "rel",   "attr:title" "title",   "attr:href",   "__fk_link"    "link" fk "__fk_link"),   ....   

3) find load statement loads sub-select resident [masterrest further down in load script , make sure reference href changed [attr:href] - or else error message while loading.

should after change:

[link]:   load [rel],     [title],     [attr:href],     [__fk_link] [__key_feed]   resident restconnectormastertable   not isnull([__fk_link]);   

Comments

  1. I think Qlik and its related aspects are always helpful if there is a need to simplify database operations.

    Qlik Rest Api Connection

    ReplyDelete

Post a Comment

Popular posts from this blog

shader - OpenGL Shadow Map -

stringtemplate - StringTemplate4 if conditional with length -