Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

kalmer_kaljuste
Contributor

IsPartialReload + Qlik-Sense-Reload-Button

Hello!

I've been surfing the whole day around Partial Reload topics and found alot of intel (which helped me out to create the basic schema).
I even found the a button for it which would make my life even easier (Qlik-Sense-Reload-Button/ReloadButton.js at master · mhamano/Qlik-Sense-Reload-Button · GitHub) -> this is the code of the button.


So the thing with the partial load is, that the "FULL LOAD" works, but if i tick "partial" with the button it loads nothing. I also checked or updated to button to give me a message box to tell me whether i selected Partial or non partial (to make sure that the button works). And yes it does work.

There is no error in my script also (atleast debugger dosen't found any problems in it + the full load works perfectly fine with the LOAD DATA button on Qlik sense + on the Reload Button.js).
Please help me out or point at what am i doing wrong. (here's just some of the code).
Cheers!

LET maxCampID = "max(campaign_ID)";

LET maxContID = "max(contact_ID)";

LET maxStatID = "max(Date)";


LIB CONNECT TO 'Hansapost';

IF IsPartialReload() = 1  THEN

campaigns:

ADD LOAD

    id as campaign_ID,

    title as campaign_title,

    dispatchDate as campaign_dispatchDate,

    status as campaign_status,

    creationtime as campaign_creationTime,

    emailSubject as campaign_emailSubject,

    emailSenderName as campaign_emailSenderName,

    emailSenderEmail as campaign_emailSenderEmail,

    emailReplyToEmail as campaign_emailReplyToEmail,

    dispatchID as campaign_dispatchID,

    size as campaign_size;

SQL SELECT id, title, dispatchDate, status, creationtime, emailSubject, emailSenderName, emailSenderEmail, emailReplyToEmail, dispatchID, size

FROM `csi_hansapost`.campaigns WHERE id > $(maxCampID);

contacts:

LOAD

    id as contact_ID,

    domain as contact_domain,

    name as contact_name,

    email as contact_email,

    active as contact_active,

    creationtime as contact_creationTime,

    `domain_broken` as contact_domainBroken,

    restriction as contact_restriction,

    restrictionTime as contact_restrictionTime,

    optintime as contact_optinTime,

    optin as contact_optinStatus,

    deleted as contact_deleted,

    deletedTime as contact_deletedTime;

SQL SELECT id, domain, name, email, active, creationtime, `domain_broken`, verified, restriction, restrictionTime,

optintime, optin, deleted, deletedTime

FROM `csi_hansapost`.contacts WHERE id > $(maxContID);

ELSE

campaigns:

LOAD

    id as campaign_ID,

    title as campaign_title,

    dispatchDate as campaign_dispatchDate,

    status as campaign_status,

    creationtime as campaign_creationTime,

    emailSubject as campaign_emailSubject,

    emailSenderName as campaign_emailSenderName,

    emailSenderEmail as campaign_emailSenderEmail,

    emailReplyToEmail as campaign_emailReplyToEmail,

    dispatchID as campaign_dispatchID,

    size as campaign_size;

SQL SELECT id, title, dispatchDate, status, creationtime, emailSubject, emailSenderName, emailSenderEmail, emailReplyToEmail, dispatchID, size

FROM `csi_hansapost`.campaigns WHERE dispatchDate >= DATE_SUB(NOW(), INTERVAL 2 YEAR);

contacts:

LOAD

    id as contact_ID,

    domain as contact_domain,

    name as contact_name,

    email as contact_email,

    active as contact_active,

    creationtime as contact_creationTime,

    `domain_broken` as contact_domainBroken,

    restriction as contact_restriction,

    restrictionTime as contact_restrictionTime,

    optintime as contact_optinTime,

    optin as contact_optinStatus,

    deleted as contact_deleted,

    deletedTime as contact_deletedTime;

SQL SELECT id, domain, name, email, active, creationtime, `domain_broken`, verified, restriction, restrictionTime,

optintime, optin, deleted, deletedTime

FROM `csi_hansapost`.contacts;
END IF

1 Reply
kalmer_kaljuste
Contributor

Re: IsPartialReload + Qlik-Sense-Reload-Button

Anyone?! I mean it's a simple IF statement and it's not working Smiley Frustrated i cannot figure it out cause i get no error from it, it just finishes the load as if it's done. (although im sure that 200k rows are missing).
Full load takes me about 1m which isn't big but in a year or two it might double the time...