Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/App-Analyzer.qvf
Binary file not shown.
4 changes: 2 additions & 2 deletions diff/App-Analyzer.qvf/app-properties.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"qTitle": "App Analyzer v6.3.7",
"qTitle": "App Analyzer v6.4.0",
"qThumbnail": {
"qUrl": "/api/v1/apps/<appId>/media/files/Dash_icon.png"
},
"description": "The App Analyzer provides a comprehensive dashboard to analyze application metadata across a Qlik Sense tenant(s).\n\nCreated by Daniel Pilla, Master Principal Analytics Platform Architect, Qlik\n\n{v6.3.7}",
"description": "The App Analyzer provides a comprehensive dashboard to analyze application metadata across a Qlik Sense tenant(s).\n\nCreated by Daniel Pilla, Master Principal Analytics Platform Architect, Qlik\n\n{v6.4.0}",
"qUsage": "ANALYTICS",
"published": false,
"hassectionaccess": false
Expand Down
52 changes: 52 additions & 0 deletions diff/App-Analyzer.qvf/dimensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,56 @@
[
{
"qInfo": {
"qId": "wVwJz",
"qType": "dimension"
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"SheetConsumptionTitleHistorical"
],
"qFieldLabels": [
"Sheet Title Historical"
],
"qAlias": "Sheet Title Historical",
"title": "Sheet Title Historical",
"coloring": {
"changeHash": "0.03427602861489043",
"hasValueColors": false
}
},
"qMetaDef": {
"title": "Sheet Title Historical",
"description": "",
"tags": []
}
},
{
"qInfo": {
"qId": "zSHXASj",
"qType": "dimension"
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"SheetConsumptionTitle"
],
"qFieldLabels": [
"Sheet Title"
],
"qAlias": "Sheet Title",
"title": "Sheet Title",
"coloring": {
"changeHash": "0.9093851131814039",
"hasValueColors": false
}
},
"qMetaDef": {
"title": "Sheet Title",
"description": "",
"tags": []
}
},
{
"qInfo": {
"qId": "QdDYzE",
Expand Down
112 changes: 95 additions & 17 deletions diff/App-Analyzer.qvf/objects/sheet--session-details-spmjcbh.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"description": ""
},
"creationDate": "2024-06-14T13:52:25.499Z",
"rank": 3.750000,
"rank": 3.687500,
"thumbnail": {
"qStaticContentUrlDef": {
"qUrl": "/api/v1/apps/<appId>/media/files/3.png"
Expand Down Expand Up @@ -1003,6 +1003,68 @@
"qMsg": {}
}
},
{
"qLibraryId": "zSHXASj",
"qDef": {
"qGrouping": "N",
"qFieldDefs": [],
"qFieldLabels": [],
"qSortCriterias": [
{
"qSortByNumeric": 1,
"qSortByAscii": 1,
"qSortByLoadOrder": 1,
"qExpression": {}
}
],
"qNumberPresentations": [],
"qActiveField": 0,
"autoSort": true,
"cId": "djpU",
"othersLabel": "Others",
"textAlign": {
"auto": true,
"align": "left"
},
"representation": {
"type": "text",
"urlPosition": "dimension",
"urlLabel": "",
"linkUrl": "",
"imageSetting": "label",
"imageLabel": "",
"imageUrl": "",
"imageSize": "fitHeight",
"imagePosition": "topCenter"
}
},
"qOtherTotalSpec": {
"qOtherMode": "OTHER_OFF",
"qOtherCounted": {
"qv": "10"
},
"qOtherLimit": {
"qv": "0"
},
"qOtherLimitMode": "OTHER_GE_LIMIT",
"qForceBadValueKeeping": true,
"qApplyEvenWhenPossiblyWrongResult": true,
"qOtherSortMode": "OTHER_SORT_DESCENDING",
"qTotalMode": "TOTAL_OFF",
"qReferencedExpression": {}
},
"qOtherLabel": {
"qv": "Others"
},
"qTotalLabel": {},
"qCalcCond": {},
"qAttributeExpressions": [],
"qAttributeDimensions": [],
"qCalcCondition": {
"qCond": {},
"qMsg": {}
}
},
{
"qDef": {
"qGrouping": "N",
Expand Down Expand Up @@ -1722,21 +1784,22 @@
],
"qMeasures": [],
"qInterColumnSortOrder": [
4,
6,
5,
7,
0,
2,
1,
3,
9,
10,
12,
11,
13,
14,
7,
11,
5,
8
15,
8,
12,
6,
9,
4
],
"qSuppressMissing": true,
"qInitialDataFetch": [],
Expand Down Expand Up @@ -1772,7 +1835,8 @@
11,
12,
13,
14
14,
15
],
"qExpansionState": [],
"qDynamicScript": [],
Expand All @@ -1791,13 +1855,15 @@
11,
12,
13,
14
14,
15
],
"columnWidths": [
-1,
-1,
59,
206,
-1,
93,
-1,
51,
Expand Down Expand Up @@ -2969,11 +3035,14 @@
}
},
{
"qLibraryId": "45ed1475-47f8-4959-977c-2eaafa435ea0",
"qDef": {
"qGrouping": "N",
"qFieldDefs": [],
"qFieldLabels": [],
"qFieldDefs": [
"=SheetConsumptionTitle \u0026 ' (' \u0026 SheetConsumptionSheetID \u0026 ')'"
],
"qFieldLabels": [
"Sheet Consumption Sheet ID"
],
"qSortCriterias": [
{
"qSortByNumeric": 1,
Expand All @@ -2984,6 +3053,7 @@
],
"qNumberPresentations": [],
"qActiveField": 0,
"qAlias": "Sheet Consumption Sheet ID",
"autoSort": true,
"cId": "Mke",
"othersLabel": "Others",
Expand Down Expand Up @@ -3386,21 +3456,29 @@
"qPos": {
"qDimName": "AppNameUnique",
"qElemNo": [
244,
334
],
"qElemValues": [
"AgAAAABgIupA"
"AgAAAAAAwJBA",
"AgAAAAAAKJJA"
]
}
},
{
"qPos": {
"qDimName": "SessionUserName",
"qElemNo": [
0
0,
1,
9,
10
],
"qElemValues": [
"BERhbmllbCBQaWxsYQA="
"BERhbmllbCBQaWxsYQA=",
"BExldmkgVHVuZXIA",
"BExldmkgcWxpay1jbGkA",
"BEVtaWx5IFRpZXJuZW4A"
]
}
},
Expand Down
48 changes: 36 additions & 12 deletions diff/App-Analyzer.qvf/script.qvs
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ Sub variables
Let vReloadTimeDiffFromGMT = ConvertToLocalTime('$(vStartTime)','$(vReloadDiffFromGMTString)') - GMT();
Set vu_personal_space_user_list = 'id','name','subject','email';
Let v90BackGMT = Date(Today(1) - 90);
Let vSheetTitleAddedDate = MakeDate(2024,12,13);

If $(vu_sessions_initial_days_back)>0 Then
If $(vu_enable_extended_session_history)=1 Then
Expand All @@ -282,13 +283,13 @@ Sub variables
Let vu_app_metadata_initial_days_back = If(IsNum(vu_app_metadata_initial_days_back),vu_app_metadata_initial_days_back,-1);
Set vMaxAppsPerReloadLimit = 10000;

Let vConsumptionQVD = '$(vOutputQVDName(Consumption,$(app_version)))';
Let vConsumptionQVD = '$(vOutputQVDName(Consumption,$(app_schema_version)))';
Let vConsumptionMinutes = 1;
Set vSessions = 1;
Set vSheetConsumptionNoNewRecords = 0; // Instantiate as zero
Set vAppExportNoNewRecords = 0; // Instantiate as zero
Let vAppReloadMetadataQVD = '$(vOutputQVDName(AppReloadCPUMetadata,$(app_version)))';
Let vAppExportQVD = '$(vOutputQVDName(ExportFromApp,$(app_version)))';
Let vAppReloadMetadataQVD = '$(vOutputQVDName(AppReloadCPUMetadata,$(app_schema_version)))';
Let vAppExportQVD = '$(vOutputQVDName(ExportFromApp,$(app_schema_version)))';
Let vIncrementalQVDsAvailable = If(Len(FileTime('$(vAppReloadMetadataQVD)'))>0,1,0); // Check to see that incremental QVDs are available
Let vIncrementalExportQVDsAvailable = If(Len(FileTime('$(vAppExportQVD)'))>0,1,0); // Check to see that incremental QVDs are available
Let vRollingQVDsAvailable = If(Len(FileTime('$(vRollingQVDName)'))>0,1,0); // Check to see that rolling QVD is available
Expand Down Expand Up @@ -1354,6 +1355,7 @@ SUB get_audit_sheet_consumption
"appId",
"sheetId",
"sheetState",
"sheetTitle",
"__FK_data_u0"
FROM "data" FK "__FK_data_u0"),
(SELECT
Expand Down Expand Up @@ -1394,12 +1396,13 @@ SUB get_audit_sheet_consumption
WITH CONNECTION (
URL "https://$(vu_tenant_fqdn)/api/v1/audits?limit=100&sort=-eventTime&source=com.qlik/analytics&eventType=com.qlik.v1.analytics.analytics-app-client.sheet-view.opened$(vISO_8601_Date_Range)$(vNextURL)"
);

CONCATENATE(SheetConsumption)
LOAD
[appId] AS AppID,
[sheetId] AS SheetConsumptionSheetID,
[sheetState] AS SheetConsumptionState,
[sheetTitle] AS SheetConsumptionTitle,
[__FK_data_u0] & '|' & $(vCounter) & '|' & '$(vUniqueKey)' AS [_SheetConsumptionTempKey]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__FK_data_u0]);
Expand Down Expand Up @@ -1682,7 +1685,7 @@ Sub app_metadata
LOAD * INLINE [AppID,AppType];

If vIncrementalQVDsAvailable = 1 then // If incremental QVDs are available -- this is set in the "configuration" section of script
Let loaded_app_ids = '$(vOutputQVDName(AppRAM,$(app_version)))';
Let loaded_app_ids = '$(vOutputQVDName(AppRAM,$(app_schema_version)))';

LoadedAppIDs:
Mapping Load Distinct
Expand Down Expand Up @@ -2215,7 +2218,7 @@ End Sub
// For loading a table from QVD ///////////////////
Sub load_qvd (table)

Let qvd_name = '$(vOutputQVDName($(table),$(app_version)))';
Let qvd_name = '$(vOutputQVDName($(table),$(app_schema_version)))';
If $(vIncrementalQVDsAvailable)=1 then

Trace Looking to load: $(qvd_name).;
Expand Down Expand Up @@ -2299,7 +2302,7 @@ End Sub

// For storing a table to QVD ///////////////////
Sub store_qvd (table)
Let qvd_name = '$(vOutputQVDName($(table),$(app_version)))';
Let qvd_name = '$(vOutputQVDName($(table),$(app_schema_version)))';
Trace Storing $(qvd_name).;
Store $(table) into '$(qvd_name)' (qvd);
Let file_size_$(table) = FileSize('$(qvd_name)');
Expand Down Expand Up @@ -2529,11 +2532,29 @@ Sub transform

Rename Table SheetConsumption To TEMP;

Max_SheetAccessDate:
Mapping Load
SheetConsumptionSheetID & '|' & AppID AS _Key_Max_SheetAccessDate,
Max(SheetConsumptionEventTime) AS SheetConsumptionSheetIDMaxTime
Resident TEMP
Where Date(SheetConsumptionEventTime + $(vReloadTimeDiffFromGMT))>=Date('$(vInitialDaysBack)')
Group By SheetConsumptionSheetID, AppID;

Map_SheetTitle:
Mapping Load
SheetConsumptionSheetID & '|' & AppID AS _Key_Max_SheetAccessDate,
If(Len(Trim(SheetConsumptionTitle))>0,SheetConsumptionTitle,If(Date(SheetConsumptionEventTime)>=Date('$(vSheetTitleAddedDate)'),'<Empty>','<Not Available>')) AS SheetConsumptionTitle
Resident TEMP
Where Date(SheetConsumptionEventTime + $(vReloadTimeDiffFromGMT))>=Date('$(vInitialDaysBack)')
AND ApplyMap('Max_SheetAccessDate',SheetConsumptionSheetID & '|' & AppID)=SheetConsumptionEventTime;

SheetConsumption:
Load
AppID,
SheetConsumptionSheetID,
SheetConsumptionState,
If(Date(SheetConsumptionEventTime)>=Date('$(vSheetTitleAddedDate)'),ApplyMap('Map_SheetTitle',SheetConsumptionSheetID & '|' & AppID),'<Not Available>') AS SheetConsumptionTitle,
If(Len(Trim(SheetConsumptionTitle))>0,SheetConsumptionTitle,If(Date(SheetConsumptionEventTime)>=Date('$(vSheetTitleAddedDate)'),'<Empty>','<Not Available>')) AS SheetConsumptionTitleHistorical,
SheetConsumptionEventID,
Timestamp(Timestamp(SheetConsumptionEventTime) + $(vReloadTimeDiffFromGMT)) AS SheetConsumptionEventTime,
SheetConsumptionUserID,
Expand Down Expand Up @@ -2617,6 +2638,8 @@ Sub transform
SessionID,
SheetConsumptionSheetID,
SheetConsumptionState,
SheetConsumptionTitle,
SheetConsumptionTitleHistorical,
SheetConsumptionEventID,
TimeStamp(SheetConsumptionEventTime,'YYYY-MM-DD hh:mm:ss') AS SheetConsumptionEventTime,
SheetConsumptionUserID,
Expand Down Expand Up @@ -2950,11 +2973,12 @@ Set startMsg=;
Set comp=;
Let vTenants = 0;

Set app_name = 'App Analyzer';
Set app_version = '6.3.7';
Let comp = ComputerName();
Let engine_ver = PurgeChar(EngineVersion(),Chr(39));
Let startMsg = 'Reloading $(app_name) v$(app_version) from $(comp) running QIX Engine version $(engine_ver)';
Set app_name = 'App Analyzer';
Set app_version = '6.4.0';
Set app_schema_version = 'sv_1.0.0';
Let comp = ComputerName();
Let engine_ver = PurgeChar(EngineVersion(),Chr(39));
Let startMsg = 'Reloading $(app_name) v$(app_version) from $(comp) running QIX Engine version $(engine_ver)';

Trace $(startMsg);

Expand Down
Loading