Qlik Community

Qlik Brasil

Group community for Brazil users. discussion only in Portuguese.

Highlighted
Not applicable

Pagination - Conexão API REST

Pessoal veja se podem me ajudar,

Consegui conectar a API de pedidos do e-commerce da minha empresa dentro do QlikSense, porém ele só traz na tabela os 100 valores/pedidos limites da primeira página.

Alguém poderia me ajudar em como fazer para a tabela de dados popular as linhas das páginas seguintes que o API tem?

Tentei pelo Pagination-->Offset mas não obtive sucesso.

Tags (1)
2 Replies
Employee
Employee

Re: Pagination - Conexão API REST

E como é o parametro para a API do seu e-commerce para paginar?

Employee
Employee

Re: Pagination - Conexão API REST

Talvez você tenha que paginar "na mão"

Using pagination with selected REST sources ‒ Qlik Connectors

LIB CONNECT TO 'REST-Google-custom (abc_admin)';

// Action required: Implement the logic to retrieve the total records

// from the REST source and assign to the 'total' local variable.

Let total = 0;

Let totalfetched = 0;

Let startAt = 0;

Let pageSize = 100;

for startAt = 0 to total step pageSize

RestConnectorMasterTable:

SQL SELECT

"__KEY_root",

(SELECT

"kind",

"etag",

"id",

"status",

"htmlLink",

"created",

"updated",

"summary",

"description",

"location",

"iCalUID",

"sequence",

"guestsCanInviteOthers",

"privateCopy",

"__KEY_items",

"__FK_items",

(SELECT

"email",

"displayName",

"self",

"__FK_creator"

FROM "creator" FK "__FK_creator"),

(SELECT

"email" AS "email_u0",

"displayName" AS "displayName_u0",

"self" AS "self_u0",

"__FK_organizer"

FROM "organizer" FK "__FK_organizer"),

(SELECT

"dateTime",

"__FK_start"

FROM "start" FK "__FK_start"),

(SELECT

"dateTime" AS "dateTime_u0",

"__FK_end"

FROM "end" FK "__FK_end"),

(SELECT

"email" AS "email_u1",

"displayName" AS "displayName_u1",

"self" AS "self_u1",

"responseStatus",

"__FK_attendees"

FROM "attendees" FK "__FK_attendees"),

(SELECT

"useDefault",

"__FK_reminders"

FROM "reminders" FK "__FK_reminders")

FROM "items" PK "__KEY_items" FK "__FK_items")

FROM JSON (wrap on) "root" PK "__KEY_root"

WITH CONNECTION(QUERY "startAt" "$(startAt)");