Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i need historical data from my data in database
i used incremental method for store main data in qvd file.
i need that when user change data in database and i reload my dashboard i want to set a flag on qvd file for each record. in first reload i want to set a 1 for flag field on record but when the data change i want to add new record to qvd file and set 0 on flag record for old record
how can i do it?
What if the same record is updated the next week? what value do you want in the flag? still 1!
instead of adding a flag try to use an updateddate or / reloaded date field
i want to change the value of flag
the old one change to 0 and new one 1
I get it; you want to keep the entire trail of record changes, but flag the current one (for an easy load).
The problem is that you cannot patch a QVD. You'll have to load-change-rewrite it in its entirety, just to change a single field value. If the table isn't that large, you can rewrite the entire table to keep things simple and efficient. Most incremental load strategies include some sort of rewriting the reference output QVD.
However, if performance is gonna be a problem (you don't mention table sizes), you could try it in another way:
Note that with this technique, you don't need a Flag field. The location of a record determines whether it is current or not.
Best,
Peter
so basically you only want the latest record to be flagged?
see this thread