Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
The below mentioned is the Log file details in the path C:\ProgramData\QlikTech\DistributionService\1\Log.
Here am attaching the my log file.In that what i want want is i used the "Let start = now() and let end =now() functions"
I want to pick up the those lines and then i have to consider that time only.
E.g :
11/24/2014 21:05:52.3794186 | Information | 2014-11-24 21:05:52: 0005 Let start = now() |
11/24/2014 21:36:20.2813389 | Information | 2014-11-24 21:36:15: 0065 Let end = now() |
Note : we have N no of let functions like Let start2,let end2 etc....
I hope my requirement is clear.
More Thanks,
Ajay
Hi,
What is the agenda behind this?
What are you trying to achieve here?
Regards
ASHFAQ
Thanks for quick reply.
I have existing architecture and its taking more time to reload.So initially what i want to know is where is taking more time(identifying from log files time).
I have to give the time taking for level like qvd wise.
Then am planning to some actions on this.
I hope your understand else let me know if in case anything required or please provide new inputs.
Ajay
Try like:
Directory;
LOAD @1,
@2,
@3,
@4,
@5,
@6,
@7
FROM
logfile.txt
(txt, codepage is 1252, no labels, delimiter is ' ', msq) where Match(@7, 'start', 'end');
Basically, using space as separator, you would find them in the field number 7 and you can decide then how to handle (either in back-end or in front-end).
Hi Ajay,
If you want only Start and End time then use
LOAD
If(@7 = 'start',@3) as Starttime,
If(@7 = 'end',@3) as Endtime
FROM
logfile.txt
(txt, codepage is 1252, no labels, delimiter is ' ', msq);
Regards
Anand
Hi,
Check if this helps
Regards
ASHFAQ
Thanks Anand.Could you please explain how @7 and @3 is working.
Ajay
Got it understood.
Thanks Ashfaq,Tresecco and Anand.
All the solutions are working fine.But i can make only one as correct 🙂
Thanks,
Ajay
Hi,
The log file is tab dilimiter file and when we load this file there is no column label given then we load it with name
Load
@1,
@2,
@3,
..
And finally we load it like
LOAD
If(@7 = 'start',Left(@3,len(@3)-1)) as Starttime,
If(@7 = 'end',Left(@3,len(@3)-1)) as Endtime,
FROM
logfile.txt
(txt, codepage is 1252, no labels, delimiter is ' ', msq);
And in front end use formula if you need time difference
'Time Diff '&interval(Starttime - Endtime ,'hh:mm:ss')
Regards
Anand