Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
LorenaGSaar
Contributor II
Contributor II

Comparing only what exists from one table.

Hello Community 😊!

I have one silly question about how to better check if one record exists from one specific table.

Example, let's suppose I have the table A, which has the content for my closed month.

LorenaGSaar_0-1644942017116.png

 

 

Then, I have my table B, witch has the content of my daily export:

LorenaGSaar_1-1644942370216.png

 

As you can see from my example, in orange is the values that has been updated, and in green what has been included on data base.

 

So I need to compare Table B with Table A, and create like a status when I have updated columns (and what exaclty has been changed), and when I have a new rows.

 

Today my solution is not 100% correct, and I think I didn't do in the better way.

For each column I'm comparing with my previous table, and creating a new column with my status.

I did so far some apply map with Keys on Table B, to compare with table A example:

Map_1:

LOAD Column1&Column2&Column3,

            Columns4

Resident Table A

 

Table B:

LOAD *,

       If(Column_4 = Column_4_old, 'Not updated', 'Updated') as Column_4_Val

LOAD *,

applymap('Map_1', Column1&Column2&Column3, 'N/A') as Column_4_old 

from Table B

But in my current table I have plenty of columns and a lot of combinations as well.

Is there any better way to solve what I'm looking for?

 

Thank you all for your support! 😁

 

 

 

Labels (1)
1 Reply
SBDataspark
Creator
Creator

Hi there LorenaGSaar,

Does your database table contain a column with a created and or a modified date?
If that's the case you might use that to compare it to the current datetime of the reload of your Qlik app based on this help document:
Loading new and updated records with incremental load ‒ Qlik Sense on Windows

Kind regards,

Sebb