Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Existence of a QVD file,while performing Incremental load

Hi,

Am facing a issue,i just want to know "how do we know to find a QVD file weather already  existing or not, while performing incremental load?

thanks in advnce

Vas

9 Replies
sundarakumar
Specialist II
Specialist II

Please go through the attache file for understanding incremental load.

Incremental load comes into picture if u r in a situvation where u have a large data set which will be updated at regular intervals,

What you do is you extract the data and save them into a qvd , everytime u reload u just read the qvd and the excess data that have beed added to the database.

So u should be having a master QVD that has all old datas, Please see we have

 

A.qvd as the master qvd in the attachment.

Hope this helps.

-Sundar

sundarakumar
Specialist II
Specialist II

If it is the first time, u should be the one creating the master QVD just use full load in attachment that creates master QVD(A.qvd) for the first time then comment it out for icremental loads.

-sundar

senpradip007
Specialist III
Specialist III

try this

If IsNull(QvdCtrateTime('YourQVDName')) = 0 then

     // QVD Exist and Incremental Load

else

     // Fresh load

end if

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Call QvdNoOfRecords() for the QVD file. This will return null() if the QVD file does not exist.So something like this:

Let zTest = Alt(QvdNoOfRecords('SourceDate.csv), 0);

If zTest > 0 Then

     LOAD * FROM SourceDate.csv;

End If

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi pradip,

thanks for fast response.

plz find the attached doc's below.

Please let me know in which area we have to use the script and how to check it to see the added data?.

  // QVD Exist and Incremental Load

else

    // Fresh load

end if

the above mentioned code where should we used.

senpradip007
Specialist III
Specialist III

If IsNull(QvdCtrateTime('YourQVDName')) = 0 then

     TSort_orders:

          LOAD Max(Date_Updated) AS Date_Updated
          From Resident (qvd)
          Order By Date_Updated;
          LET vupdatedate
=Peek('Date_Updated',-1,'Sort_orders');

          Drop Table TSort_orders;

         

     SortOrder:

     LOAD *         

     From Resident (qvd)
     Order By Date_Updated;

     concatenate(SortOrder)

     LOAD OrderID,
          ProductID,
          CustomerID,
          Amount,
          Date_Updated
FROM $(vsourcedata)
Orders.xlsx

(ooxml, embedded labels, table is [new orders])
Where Date_Updated >= $(vupdatedate);

STORE SortOrder into $(vsavedqvd)FullData.qvd(qvd);

else

       Orders:

          LOAD OrderID,
               ProductID,
               CustomerID,
               Amount,
               Date_Updated
          FROM
               $(vsourcedata)
Orders.xlsx
               (
ooxml, embedded labels, table is Orders);

          STORE Orders into $(vsavedqvd)Orders.qvd(qvd);

end if

Not applicable
Author

Hi,

How to see it means how to see the existing qvd data

sundarakumar
Specialist II
Specialist II

load the qvd into a seperate app and u can view the data in it..


Not applicable
Author

hi,

  i want in another way............this is i knew