Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Partial reload - Drop table error

Hi all,

Would you please be able to help me with this?

I have a quite big dashboard pulling data from 2 to 3 different data sources, and in the script i'm using lots of links and Drop table and Rename statements.

I am trying to do a Partial Reload of one specific database source out of the 3. Is it possible ?

I have added a Replace Load on the tables that I want to have a Partial Reload, but I get an error with the Drop table statement.

Can you please advise on this?

1 Solution

Accepted Solutions
sunny_talwar

Then try this

[CustomerServices_Temp]:

REPLACE LOAD *,

  DATE (Date_column) AS %DOF,

  ;

  SQL

  SELECT

  *

  FROM

  Customer_Table

If that's true, then may be do something like this

IF NOT IsPartialReload() THEN

    Your script which doesn't have to be partially reloaded

ENDIF

IF IsPartialReload() THEN


    [CustomerServices_Temp]:

    REPLACE LOAD *,

      DATE (Date_column) AS %DOF,

      ;

      SQL

      SELECT

      *

      FROM

      Customer_Table;


ENDIF

View solution in original post

12 Replies
sunny_talwar

Can you share the script you are using?

prieper
Master II
Master II

DROP TABLE3;

TABLE3:

ADD LOAD * FROM ......;

EXIT SCRIPT;

REPLACE does not always seem to work. ADD is important.

HTH Peter

Not applicable
Author

Hi all,

my script is very big but I have attached a sample of the script following the same principle.

I am trying to partial reload todays date from Calendar and partial reload the data from Customer_table.

I have added REPLACE to the Calendar and Customer tables.

but I am not sure why is it coming with an error with the Drop of the sales table even though I am renaming the Temp to Sales.

sunny_talwar

So this is the only table you are looking to partially reload?

[CustomerServices_Temp]:

REPLACE LOAD *,

  DATE (Date_column) AS %DOF,

  ;

  SQL

  SELECT

  *

  FROM

  Customer_Table

If that's true, then may be do something like this

IF NOT IsPartialReload() THEN

    Your script which doesn't have to be partially reloaded

ENDIF

IF IsPartialReload() THEN


    [CustomerServices_Temp]:

    REPLACE LOAD *,

      DATE (Date_column) AS %DOF,

      ;

      SQL

      SELECT

      *

      FROM

      Customer_Table;


ENDIF

Not applicable
Author

Hi All,

Thank you for your help with this.

Sunny: I have tried that but unfortunately the data reloads only ifpartial reload, and I want the customer table to reload both in partial reload and full reload.

sunny_talwar

Then try this

[CustomerServices_Temp]:

REPLACE LOAD *,

  DATE (Date_column) AS %DOF,

  ;

  SQL

  SELECT

  *

  FROM

  Customer_Table

If that's true, then may be do something like this

IF NOT IsPartialReload() THEN

    Your script which doesn't have to be partially reloaded

ENDIF

IF IsPartialReload() THEN


    [CustomerServices_Temp]:

    REPLACE LOAD *,

      DATE (Date_column) AS %DOF,

      ;

      SQL

      SELECT

      *

      FROM

      Customer_Table;


ENDIF

ramasaisaksoft

Hi Amir,

unable to open your application because of License issue.

may be the below code will help to you .

It's worth noting that ADD and REPLACE loads are executed in both normal and partial reloads, unless you use the ONLY qualifier, to make the ADD or REPLACE take place only if a partial reload has been executed. So

Customers:

REPLACE LOAD *

FROM Customers.qvd (qvd);

Will work always, removing the table Customers and replacing it by the records in the QVD file, whilst

Customers:

REPLACE ONLY LOAD *

FROM Customers.qvd (qvd);

Will only be loaded if the execution was partial, but not when the reload is normal.

Hope that makes the thing easier to understand.

Not applicable
Author

Sunny: Thank you ever so much for your help that resolved my issue

Not applicable
Author

Hi Sunny:

Would you please explain how does this function work? and would the Drop table function work with Partial Reload? any idea?

Much appreciated