Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to compare data is same between 2 similar qvd files
Hi Pratheek,
What do you want to compare?
If you want to look at the data difference then you can do a Binary load into two separate qvw files and compare there.
Or might be this comparing data might help you .
Hi Sai
I have 2 qvd files with same fields and same data and want to compare all the data in the fields are matching.
So if let me know how to do the binary load
The script for Binary load is
Binary[YourQVD];
YourQVD is the name of the QVD file where you have the data.
Create a new qvw and write this statement this will fetch all the data from your QVD.
Hi..Sai,
Please refer below mentioned URL it may help you:
Please remember to mark this as "helpful" & "correct answer" if your query has been solved.
This will help users identify the answers should they come across this thread in the future.
Regard's
Sarvesh Srivastava
Hi..Pratheek,
My initial idea (some years ago when dealing with a problem with Incremental loads of very large tables) was:
Make a QVW document that:
If you want to do it for all fields, you're in for a lot of work. If you want to do this for a few important fields, or just to count the number of differing records, it is doable.
Please remember to mark this as "helpful" & "correct answer" if your query has been solved.
This will help users identify the answers should they come across this thread in the future.
Regard's
Sarvesh Srivastava
Hi Sarvesh
Could you please send the scripting for my refernce
Please check the attachment.
That will work as long as the QVDs have a unique key field. If not, the join could cause problems. For this reason, I normally concatenate the two QVDs, like so:
Data:
LOAD *,
FileBaseName() as Source
From <first QVD>.qvd (qvd);
Concatenate(Data)
LOAD *,
FileBaseName() as Source
From <second QVD>.qvd (qvd);
Replace the placeholders with the actual filenames.
Then use set expressions to select counts / sums / etc from file1 and file2. I usually use descriptive value for the Source field rather than the FileBaseName() as above.
So create a table with the relevant fields as dimensions, then use something like
File1 Customers:
Count({<Source = {'<first QVD name'}>} Customer)
File2 Customers:
Count({<Source = {'<seconds QVD name'}>} Customer)
Customer difference:
Count({<Source = {'<first QVD name'}>} Customer) - Count({<Source = {'<seconds QVD name'}>} Customer)
File1 Transactions:
Sum({<Source = {'<first QVD name'}>} Amount)
...
and so on.