Skip to content

Instantly share code, notes, and snippets.

Created October 10, 2013 13:25
Show Gist options
  • Save anonymous/6918259 to your computer and use it in GitHub Desktop.
Save anonymous/6918259 to your computer and use it in GitHub Desktop.
Sessions:
Load
Timestamp,
subfield(filename(), '_', 2) & '_' & left(Timestamp, 13) as Key,
Time(Timestamp) as SessionsTime,
Timestamp as SessionsTimestamp,
[Exe Type] as SessionExeType,
[Exe Version] as SessionExeVersion,
if(len([QlikView User]) = 0 ,Timestamp&'-'&[Session Start]&'-'&[Authenticated user]&'-'&Lower(Mid(Document,Index(Document,'\',-1)+1)),
Timestamp&'-'&[Session Start]&'-'&[QlikView User]&'-'&Lower(Mid(Document,Index(Document,'\',-1)+1)) ) as SessionID,
if(len([QlikView User]) = 0 ,[Authenticated user],[QlikView User]) as UserID,
Lower(Document) as DocumentPath,
Lower(Mid(Document,Index(Document,'\',-1)+1)) as DocumentName,
[Document Timestamp],
[QlikView User],
[Exit Reason],
[Session Start],
[Session Duration],
[CPU spent (s)],
[Bytes Received],
[Bytes Sent],
Calls as SessionCalls,
Selections as SessionSelections,
[Authenticated user],
// trim(mid([Authenticated user], 9)) AS [Authenticated userrrr],
[Serial number],
[Client Type],
[Secure Protocol],
[Tunnel Protocol],
[Server Port],
[Client Address],
[Client Port],
// [Experienced Performance],
// [Server Started],
[Identifying user], // added in 8.5
[Client machine identification], // added in 8.5
[Cal Type], // added in 8.5
[Cal Usage Count] // added in 8.5
FROM $(LogPath)\SESSIONS*.LOG (utf8, txt, delimiter is '\t', embedded labels);
LEFT JOIN (Sessions)
LOAD
// trim(NT_USER) as [Authenticated userrrr],
'DOMAIN\' & NT_USER AS [Authenticated user],
// NT_USER,
// Vorname,
// Nachname,
Vorname & '|' & Nachname as Full_Name
FROM
QVD\VWL_User.qvd
(qvd);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment