Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I want to backup my QVD files (at Specified Path) before reloading those next day.
My QlikView Architecture is PULL All Dimensions Data from DWH and load Each Dimension data into Separate QVD Files. Schedule to reload all the dimensions by 6 AM after DWH load completed.
Before reloading dimensions QVD files, I want to backup then at Specified location.
How Can I achieve it?
I tried with below but I am not sure where it is keeping the backup file and also no option to specify a path.
Please guide me.
Please Find the url on the Qlikview page which Shown in the image.
In the Same Place the Backup Files Also Stored As Version 1 .filename .Please check the file Url Place
Example : c:\Users\Programfiles(x86)\Desktop\Filename saved.
If you got the answer Give it correct answer in the thread and close the thread
Thanks & Regards
Navven
Hi
The user preferences backup options are for backing up the qvw documents, not for qvd data files. If you want to back them up in the load before reloading the model, you will need to call an external command. The best way would be to create a .bat or .cmd batch file that copies the QVDs to the backup location and call that batch file with something like:
EXECUTE c:\scripts\copyQVDs.bat
Set path and file name acccording to your needs
HTH
Jonathan
If you use a batch file to reload the model, then incorporate the copy commands into the batch file. If you use publisher, you can create a dependant external task to do the copies.
I have a similar requirement with one customer. Rather than back them up, I create two copies of the extracted QVDs so we can always roll back in time to a particular set of extracts.
SET vExtractQVD = ..\3_Data_Sources\ExtractQVD\;
LET vByDateDir = '$(vExtractQVD)' & timestamp(now(1),'YYYYMMDD_hhmm') & '\';
EXECUTE cmd.exe /C MKDIR "$(vByDateDir)";
And then in the following extract routine I do the store twice.
STORE [$(vTableName)] INTO [$(vExtractQVD)$(vQvdname)]; | ||
STORE [$(vTableName)] INTO [$(vByDateDir)$(vQvdname)]; |
-Rob
Here is the Script to Take Backup of QVD data files before scheduled reloading.
I have plan to keep backup of latest 6 days QVDs.
SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;-$#,##0.00';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='YYYY-MMM-DD';
SET TimestampFormat='D/MM/YYYY h:mm:ss[.fff] TT';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
$(Include=d:\shivendoo\qlikview config\qlikview_file_config.txt);
SET vFolderNameTodayI='Date(Today())';
LET vFolderNameToday=$(vFolderNameTodayI);
SET vFolderName7DaysOldI='Date(Today()-7)';
LET vFolderName7DaysOld=$(vFolderName7DaysOldI);
//Create A Folder With Name as Today Date
EXECUTE cmd.exe /C MD "$(vBKPDimFolderPath)\$(vFolderNameToday)";
//Backup QVD Data before scheduled reloading
DIM_EMP_DATA:
LOAD *
FROM $(vDimQVDStoragePath)\DIM_EMP_DATA.QVD (qvd);
//Store the Backuped QVD in FOLDER Named as Date(Today())
STORE DIM_EMP_DATA INTO $(vBKPDimFolderPath)\$(vFolderNameToday)\$(vFolderNameToday)-DIM_EMP_DATA.QVD;
DROP TABLE DIM_EMP_DATA;
//Delete a Folder (& files under it) Named as Date(Today()-7) Using CMD Commands
EXECUTE cmd.exe /C RD /Q /S "$(vBKPDimFolderPath)\$(vFolderName7DaysOld)";
Where qlikview_file_config.txt contains below values.
SET vDimQVDStoragePath='D:\Shivendoo\Dim Data Source QVD Files';
SET vFactQVDStoragePath='D:\Shivendoo\Fact Data Source QVD Files';
SET vBKPDimFolderPath='D:\Shivendoo\QVD BackUp\Dim Data Source QVD Files';
Hi,
First you will upload the qvd files into qvw and then create the temp_table after that by using peek function, for loop and if condition then
let vTmpScript = 'FirstPath SecondPath';
Execute SecondPath;
Thanks,
Krish