Qlik Community

Ask a Question

App Development

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

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
FMDF
Contributor III
Contributor III

Check for existence of QVD

I have seen similar posts and I have tried the solutions.  Nothing is working.  Seems like it should be simple enough.

No matter what method I have used...qvdcreatetime, qvdfilesize...They always return null.  The file exists.  The path is correct.  The capitalization is correct.  I don't know what is going wrong with this.

 

SET vFileName = 'F:\FMCustom\01_Staging\QVD\Oracle\ItemOnhandQtyDetail_HIST.QVD';

//If the snapshot table exists, load it for the last 3 years and append the new snapshot.

IF (NOT isNull(qvdCreateTime($(vFileName)))) THEN

ItemOnhandQtyDetail_HIST:
LOAD
DISTINCT
*
FROM [lib://FM Staging/QVD/Oracle/ItemOnhandQtyDetail_HIST.QVD](qvd)
Where
Year(dateLoaded) >= Year(Today())-2
;

 

//Append todays data to the HIST table.

Concatenate(ItemOnhandQtyDetail_HIST)
LOAD
itemKey,
organizationId,
inventoryItemId,
subinventoryCode,
primaryTransactionQty,
locatorId,
dateLoaded
FROM [lib://FM Staging/QVD/Oracle/ItemOnhandQtyDetail.QVD](qvd);

ELSE
//Snapshot Table does not exist yet. Load it from the current data load.

ItemOnhandQtyDetail_HIST:
LOAD
*
FROM [lib://FM Staging/QVD/Oracle/ItemOnhandQtyDetail.QVD](qvd);
;
END IF

 

0 Replies