Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a requirement.
1st QVD
... I want to make a QVD on daily basis with a retention period of 10 days say. So every day, a new QVD will create automatically. So at the end of period I will have ..
day1.qvd ... day2.qvd, ........to..................................... day10.qvd
2nd QVD
The second QVD will take data from the last 3 qvd which were created earlier.
So 2nd.qvd have data of ... day8.qvd , day9.qvd and day10.qvd data.
As described earlier I have retention period of 10 days so on 11th day. I have qvd from day2.qvd to day11.qvd and day1.qvd will delete automatically and correspondingly the 2nd.qvd will have data loaded from day9.qvd, day10.qvd and day11.qvd.
Please suggest me some idea how to achieve this.
Thanks.
Regards,
Sachin A.
Hi,
You could try to rename all the qvds in the script. Create the 10 qvd (in a begining, when you don't have data for the 10 days, create only empty files). Then delete day1.qvd, and rename the rest:
day2.qvd --> day1.qvd
day3.qvd --> day2.qvd
...
day10.qvd-->day9.qvd
Once this is done, you can create day10.qvd with new data. By working in this way, your script will write always day 10, and read day 8, 9 and 10
Regards
Hi.
Seems nice, could you please elaborate a bit the workflow and how to achieve the same?
Regards,
Sachin A.
Can we do on the basis of date ? Because if we rename we have to iterate many times, because in original scenarios the retention is not 10 days.
So if possible like this..
Suppose Retention = 5 days.
Day_DDMMYYYY.qvd (assume format)
Day_15122000.qvd
Day_16122000.qvd
Day_17122000.qvd
Day_18122000.qvd
Day_19122000.qvd
On 20122000, delete Day_15122000 and create Day_20122000.qvd.
This process will be more convenient for us.
How to achieve this any idea ?
Thanks.
Hi all,
Please give me some suggestive actions.
Regards,
Sachin A.
Hi, I basically just implemented the suggestion.
I created a loop for the first part and a second loop to make your 2nd part
You can set retention lenght on the script (and also how many days you want to group for the second part)
(it's only a script)
Hope it helps,
Erich