Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have a one log file.This is a unstructured format.how to arrange this type of file in qlikview.Please help me.
Hi Mani,
Can you attached your log file?
Regards,
Sokkorn
HI Sokkorn
Hi have attached a log file.
02145 12.02.13 EmpID:02365, DepID:3265, SalID:32365
02145 12.02.13 Status_comm: Proessing Succeded for 02145
02149 12.02.13 EmpID:02366, DepID:3268, SalID:32366
02149 12.02.13 Status_comm: Proessing Succeded for 02149
02150 12.02.13 EmpID:02367, DepID:3269, SalID:32369
02150 12.02.13 Status_comm: Proessing Succeded for 02150
i try to use fixed Record option.i can't able this process.
Have a look at DocLog Analyzer created by Rob at robwunderlich.com/downloads/
Hi Angad,
I download this qvw file.but the Data source is not loaded.what i do.
Hi Mani,
Let try this
[LogFile]:
LOAD
@1:14 AS [tmpField1],
@15:n AS [tmpField2]
FROM [Log.log]
(fix, codepage is 1252);
[Table1]:
LOAD
[tmpField1] AS _Key,
[tmpField2] AS Field1
Resident [LogFile] Where WildMatch(tmpField2,'*EmpID*');
Join (Table1)
LOAD
[tmpField1] AS _Key,
[tmpField2] AS Field2
Resident [LogFile] Where WildMatch(tmpField2,'*Status_comm*');
[Table2]:
LOAD
_Key,
Trim(SubField(FieldN,':',1)) AS FieldName,
Trim(SubField(FieldN,':',2)) AS FieldVal;
LOAD
_Key,
Trim(SubField(NewField,',')) As FieldN
;
LOAD
_Key,
//SubField(_Key,' ',1) AS RecID,
//Date(Date#(SubField(_Key,' ',2),'dd.MM.yy')) AS Dates,
Field1 & ', ' & Field2 AS NewField
Resident [Table1];
DROP Table [Table1];
[TMP1]:
Generic LOAD * Resident [Table2];
[tmpResult]:
LOAD Distinct _Key Resident [Table2];
DROP Table [Table2];
FOR i = 0 to NoOfTables()
TableList:
LOAD TableName($(i)) AS Tablename AutoGenerate 1
Where WildMatch(TableName($(i)), 'TMP1.*');
NEXT i
FOR i = 1 to FieldValueCount('Tablename')
LET vTable = FieldValue('Tablename', $(i));
Left Join ([tmpResult]) LOAD * Resident $(vTable);
DROP Table $(vTable);
NEXT i
DROP Table TableList;
[Result]:
LOAD
SubField(_Key,' ',1) AS RecID,
Date(Date#(SubField(_Key,' ',2),'dd.MM.yy')) AS Dates,
*
Resident [tmpResult];
DROP Table [tmpResult];
DROP Field [_Key];
See sample attached file also.
Regards,
Sokkorn
Which Data Source you are talking about. You just need to give the path of the directory where you have the logs.
Thanks Sokkorn,now its working.but i have one more file, like
02145 12.02.13 EmpID:02365, DepID:3265,
02145 12.02.13 EmpID:02345, DepID:3265,
02145 12.02.13 Status_comm: Proessing Succeded.
02145 12.02.13 EmpID:02346, DepID:3265,
02145 12.02.13 EmpID:02347, DepID:3265,
02149 12.02.13 EmpID:02366, DepID:3265,
02149 12.02.13 Act: Processing Succeded.
02149 12.02.13 Act: to 123456789
02145 12.02.13 EmpID:02366, DepID:3266,
02145 12.02.13 EmpID:02346, DepID:3266,
02145 12.02.13 Status_comm: Proessing Succeded.
02145 12.02.13 EmpID:02347, DepID:3266,
02149 12.02.13 EmpID:02367, DepID:3266,
02149 12.02.13 Act: Processing Succeded.
02149 12.02.13 Act: to 123456780
In this my log file, so i want to be extract only DepId and EmpId only to report. Please give how to separate DepId and EmpId.