Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello people,
Hope this finds you well.
What do you do if you have a table that contains millions of rows and the reload of data takes more than 30 minutes?
Thanks
Use partial load.. below script appends the modified records to the previously loaded records
Set vTarget='MyTable';
Set vTargetFolder='C:\';
Set dbPrefix ='dbo.';
//if not IsPartialReload() then
if IsNull(FileSize( '$(vTargetFolder)$(vTarget).qvd' )) then
$(vTarget):
SQL Select *
FROM $(dbPrefix)YourTable(nolock) ;
else
let LastExecTime=QvdCreateTime('$(vTargetFolder)$(vTarget).qvd');
$(vTarget):
SQL Select *,
UpdatedDate
FROM $(dbPrefix)YourTable
WHERE UpdatedDate>'$(LastExecTime)';
concatenate add load * from $(vTargetFolder)$(vTarget).qvd(qvd)
where not Exists(YourPrimaryKey);
end if;
STORE $(vTarget) INTO $(vTargetFolder)$(vTarget).qvd (qvd);