4 Replies Latest reply: Jul 25, 2013 4:52 PM by Mick Dunnavant RSS

    Where did my QVD go?

      I'm tracking another issue and in doing so found some peculiar behavior (at least it is to me).  I have an application that stores data into two QVD files.  During the reload I see those files being created.  However, after the reload the QVD's disappear and on my next reload I'm pulling a full dataset instead of an incremental one, so bascially I'm never doing an incremental load.   No where in my script do I delete files.


      Anybody know what migh be going on here?



        • Re: Where did my QVD go?
          Stefan Wühl

          Hard to say without knowing your setting / script.


          Could you post your script?


          You are not using the BUFFER prefix, are you?

            • Re: Where did my QVD go?

              There's a lot to the script, but here's the jist where I'm creating/loading one of the QVDs.





              //SET vQvdFile='c:\mick\openfolder\qv\GenAct.qvd'; //The QVD filename on my machine
              SET vQvdFile='E:\QlikView\Documents\Knova\GenAct.qvd'; //The QVD filename on NOCDKMCOMBO1
              SET vTableName='RGN_GenAct';  //The name of the QV table we are loading on the Data Load tab
              //SET vPK='EventId';    // Data Primary Key

              // Set a variable indicating if the QVD exists or not. -1 is True, 0 is False
              LET vQvdExists = if(FileSize('$(vQvdFile)') > 0, -1, 0);

              IF $(vQvdExists) THEN  // QVD exists, we will do an incremental reload
              // Get the max date from this QVD for use in incremental SELECT
              LOAD max(date(LogDate)) as maxdate //Set the name of the date or datetime field
              FROM $(vQvdFile) (qvd);
              LET vIncrementalExpression = 'WHERE LogDate >' & chr(39) & peek('maxdate') & chr(39);
              DROP table maxdateTab;

              ELSE      // QVD does not exist
              LET vIncrementalExpression = '';  // No QVD. Force full reload
              END IF

              sql select
              , LogTime
              ,  SessionID
              ,  UserID
              ,  EventType
              ,  Microsite as SessionMicrosite
              ,  upper(SearchQuery) as SearchQuery
              ,  UserName
              ,  UserTitle
              , UserDepartment
              ,  UserRole
              ,  BankingGroup
              ,  BankingArea
              ,  BankingMarket
              , UserCCName
              ,  UserBranchID
              ,  UserCCID
              from "kanalyticsprod"."dbo"."RGN_GenAct"

              // If incremental reload was , load previous data and concatenate to data just read.
              IF $(vQvdExists) THEN
              // Use CONCATENATE in case we've added any new fields.
              CONCATENATE ($(vTableName)) LOAD * FROM $(vQvdFile) (qvd)
              END IF

              Overwrite the QVD with the QV datatable.
              STORE $(vTableName) INTO $(vQvdFile);


                • Re: Where did my QVD go?

                  A couple of interesting items....


                  1 - When I reload the app from my machine it reloads fine, but the QVDs disappear.

                  2 - When I reload the exact same app from the QV server it fails, but the QVDs are where I expect them to be.


                  Server = v11.00.11282 x86

                  Desktop = v11.20.11922 x64

                    • Re: Where did my QVD go?

                      Looks like I found it.  There is a setting under Document Properties, General tab called 'Keep Unreferenced QVD Buffers'.  I'm not sure why the default is to delete them, but when I check this setting my QVD's remain on disk and I can reference them for my incremental loads on subsequent reloads.