Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
riishabhz
Creator
Creator

incremental load on txt file without date field.

hello everyone

12.PNG

my txt file looks like this and link is here as they are not allowing me to attach txt file.

https://drive.google.com/file/d/1DlQW8Sc4h0JRmLu5diIgsV8b4lH1dhIr/view?usp=sharing

use delimater as this | pipe sign  

please help me to do incremental and update the records on the basis of ean which is the column after MGRP4DESC column.

please help me i am in need.

i searched everywhere but didnt got solution.

 

20 Replies
dplr-rn
Partner - Master III
Partner - Master III

My friend i am at a full time job. But i am trying to help but unfortunately i cannot write the whole thing for you.

For your learning i would suggest you try the approach suggested. Where you are going wrong i will be able to help.

can you answer my questions from previous reply

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

How about:

Master:
LOAD *
FROM
[..\Downloads\MasterFile.txt]
(txt, codepage is 28591, embedded labels, delimiter is '|', msq);

Concatenate (Master)
LOAD *
From Master.qvd (qvd)
Where not exists(EAN)
;

STORE Master into Master.qvd (qvd);

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

riishabhz
Creator
Creator
Author

Ok sir thanx will try tomorrow morning and will update you 🙂
riishabhz
Creator
Creator
Author

yes sir its working but its not updating the value .

like this example 

ean | price

1|10

1|20

qlikview should show ean 1 price as 20 because its updated value, but instead of updating it is adding and showing 30

what should i do now?

 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Did you include the:

Where not exists(EAN)

Can you post your script?

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

riishabhz
Creator
Creator
Author

Yes sir i did include it, just same example that you gave.
riishabhz
Creator
Creator
Author

here is my script:-
master:
LOAD MATERIAL,
COLOR,
SIZE,
[Size Group],
Description,
COMPOSITION,
BRANDCD,
BRAND,
SEASON,
SEASONDESC,
THEME,
DELYCODE,
GENDER,
ProductHierarchy,
MaterialGroup,
[Core/Fashion],
FIT,
PATTERN,
[Key/NonKey],
RANGE,
ORIGIN,
[Top/Bottom],
SLEEVE,
NECK,
WEATHER,
OCCASSION,
CustomDesc,
MaterialGrp4,
MGRP4DESC,
EAN,
ALTEAN,
PurchaseGroup,
PurchaseGroupDesc,
CATEGORY,
SUBCAT,
BASECOMP,
MaterialType,
ValuationClass,
COST,
MRP,
ChangeDt
FROM
[..\material master and customer master txt\MAT_MAS_20190731_131746.txt]
(txt, codepage is 1252, embedded labels, delimiter is '|', msq) ;

 

Concatenate(master)
LOAD MATERIAL,
COLOR,
SIZE,
[Size Group],
Description,
COMPOSITION,
BRANDCD,
BRAND,
SEASON,
SEASONDESC,
THEME,
DELYCODE,
GENDER,
ProductHierarchy,
MaterialGroup,
[Core/Fashion],
FIT,
PATTERN,
[Key/NonKey],
RANGE,
ORIGIN,
[Top/Bottom],
SLEEVE,
NECK,
WEATHER,
OCCASSION,
CustomDesc,
MaterialGrp4,
MGRP4DESC,
EAN,
ALTEAN,
PurchaseGroup,
PurchaseGroupDesc,
CATEGORY,
SUBCAT,
BASECOMP,
MaterialType,
ValuationClass,
COST,
MRP,
ChangeDt
FROM
[..\qvw file\qvd file\master1.qvd]
(qvd)Where not exists(EAN);

STORE master into [..\qvw file\qvd file\master1.qvd](qvd);

see photos , in excel i updated the value from 999 to 100 but qlikview is showing both the data , i want qlikview to show me 100 in data

WhatsApp Image 2019-08-29 at 3.50.23 PM.jpegWhatsApp Image 2019-08-29 at 3.51.19 PM.jpeg

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

So your txt file has both the old and the new values for the same EAN?  And you want the last value in the file?

-Rob

riishabhz
Creator
Creator
Author

Yes sir, i want only new value to be shown in records
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

master:
LOAD
*,
RecNo() as RecId
FROM
[..\material master and customer master txt\MAT_MAS_20190731_131746.txt]
(txt, codepage is 1252, embedded labels, delimiter is '|', msq) ;

Inner Join(master)
LOAD EAN, Max(RecId) as RecId
Resident master
Group by EAN
;
DROP FIELD RecId;

 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com