Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
bw7
Contributor
Contributor

Comparison of two QVDs

Hello,

I want to compare two QVDs and check which rows have data that is only in one QVD and not in both. I hope someone has an helpfull Idea or nows a tool or website that can do this.

Labels (1)
1 Solution

Accepted Solutions
justISO
Specialist
Specialist

Hi, you can try just to load them together in Qlik and see what rows are different. Load script could look like this, if both QVD have same column names:

tb1:
LOAD *,
1 as ind_tb1
FROM 1qvd;

JOIN
LOAD *,
1 as ind_tb2
FROM 2qvd;

NoConcatenate
only_unique_rows:
LOAD *
RESIDENT tb1
WHERE ind_tb1<>1 or ind_tb2<>1;

DROP TABLE tb1;

Basically, you load your first QVD and mark each row with indicator to know that it comes from 1QVD. You join second QVD with JOIN, so if rows are identical in both QVD it will merge, if not, it will be separate row. We also add indicator ind_tb2. Now we just reload only unique rows in one of two tables. ind_tb1 and ind_tb2 will show you in witch QVD it is unique.

View solution in original post

1 Reply
justISO
Specialist
Specialist

Hi, you can try just to load them together in Qlik and see what rows are different. Load script could look like this, if both QVD have same column names:

tb1:
LOAD *,
1 as ind_tb1
FROM 1qvd;

JOIN
LOAD *,
1 as ind_tb2
FROM 2qvd;

NoConcatenate
only_unique_rows:
LOAD *
RESIDENT tb1
WHERE ind_tb1<>1 or ind_tb2<>1;

DROP TABLE tb1;

Basically, you load your first QVD and mark each row with indicator to know that it comes from 1QVD. You join second QVD with JOIN, so if rows are identical in both QVD it will merge, if not, it will be separate row. We also add indicator ind_tb2. Now we just reload only unique rows in one of two tables. ind_tb1 and ind_tb2 will show you in witch QVD it is unique.