1 Reply Latest reply: Apr 26, 2016 5:11 AM by Kalmer Kaljuste RSS

    IsPartialReload + Qlik-Sense-Reload-Button

    Kalmer Kaljuste

      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