Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts
I am having the following data set
OLD_DataSet:
Wo_Pk Hours Status
100 15 Complete
101 20 Complete
105 30 Pending
107 40 Complete
108 30 Pending
NEW_DataSet:
Wo_Pk Hours Status
100 15 Complete
101 20 Complete
105 30 Complete
107 40 Pending
108 30 Complete
110 10 Complete
In the above highlighted records are modified ,
Here i want to update the records based upon the "Wo_Pk".(Based upon the requirement 'No need to create Common Key')
i) update newly added records
ii) Add newly added records from NEWDataSet
Please help me, to write the Script
Thanks
Madhu
Hi Madhu,
Any date field is there to track the changes in your source?
If so, you can use incremental load to achieve the above logic.
Regards,
Leni Balakrishnan
thanks for reply
I don't have date field, I have only 'Wo_Pk' as primary key
There should be Modified to pull updated data so that you can do the incremental load
See the below link
http://www.analyticsvidhya.com/blog/2014/09/qlikview-incremental-load/
When record is updated some field values gets modified, but in your case not even status is modified then how can you say it is modified?
Your question is confusing.
>>In the above highlighted records are modified ,
No they are not -- There is no difference between old and new for the hightlighted lines, so I have no idea what you are trying to achieve.
>>i) update newly added records
>>ii) Add newly added records from NEWDataSet
What is the difference between these two? You cannot update them if they have not been added, and why do you need to update them if you have just added them?
Sorry Jonathan Dienst
OLD_DataSet:
Wo_Pk Hours Status
100 15 Complete
101 20 Complete
105 30 Pending
107 40 Complete
108 30 Pending
NEW_DataSet:
Wo_Pk Hours Status
100 15 Complete
101 20 Complete
105 30 Complete
107 40 Pending
108 30 Complete
110 10 Complete
this is my data set
How can you tell, without reading the entire data set, what has changed?
Are the Wo_PK value continually increasing (so that new Wo_Pk values will be greater than older ones)? And is there some status which will indicate that no more updates are coming through (eg Complete)?
If both of these conditions are satisfied, then you can do an update style incremental load by doing the following:
It is not as efficient as having a last updated date, as you will often be reading unchanged statuses from the database, but it may still be worthwhile because you do not need to load completed Wo_Pk values.
Thanks for reply ,
In my data set values are changing like 110,115,90,67,...150,....
How we can update and insert records based on "Wo_Pk"
Then an update type incremental load is not possible as you have to load the entire dataset anyway to determine what has changed.