Skip to main content

Suggest an Idea

Vote for your favorite Qlik product ideas and add your own suggestions.

Announcements
This page is no longer in use. To suggest an idea, please visit Browse and Suggest.

Rest monitor Schema Event : please update the Increment Option field (Hourly, Daily...) !!

simonaubert
Partner - Specialist II
Partner - Specialist II

Rest monitor Schema Event : please update the Increment Option field (Hourly, Daily...) !!

Hello all,

Here a very simple idea : 

 

I use the increment option field in my monitoring with a mapping table. My purpose is to get the hourly, daily, once... scheduled trigger. Here some lines of my code (not complete): 

LIB CONNECT TO 'REST_Custom_Monitor_SchemaEvent';
RestConnectorMasterTable:
SQL SELECT 
	"id" AS "id_u8",
	"createdDate",
	"modifiedDate",
	"modifiedByUserName",
	"timeZone",
	"daylightSavingTime",
	"startDate",
	"expirationDate",
	"incrementDescription",
	"incrementOption",
	"name" AS "name_u1",
	"enabled" AS "enabled_u1",
	"eventType",
	"userSyncTask",
	"externalProgramTask",
	"privileges" AS "privileges_u8",
	"schemaPath",
	"reloadTask",
	"__KEY_root",
	(SELECT 
		"@Value",
		"__FK_schemaFilterDescription"
	FROM "schemaFilterDescription" FK "__FK_schemaFilterDescription" ArrayValueAlias "@Value"),
// 	(SELECT 
// 		"id",
// 		"nextExecution",
// 		"timesTriggered",
// 		"privileges",
// 		"__FK_operational"
// 	FROM "operational" FK "__FK_operational"),
	(SELECT 
		"id" AS "id_u3",
		"name",
		"taskType",
		"enabled",
		"taskSessionTimeout",
		"maxRetries",
		"privileges" AS "privileges_u3",
		"__FK_reloadTask",
		"__KEY_reloadTask"//,
// 		(SELECT 
// 			"id" AS "id_u2",
// 			"nextExecution" AS "nextExecution_u0",
// 			"privileges" AS "privileges_u2",
// 			"__FK_operational_u0",
// 			"__KEY_operational",
// 			(SELECT 
// 				"id" AS "id_u1",
// 				"executingNodeName",
// 				"status",
// 				"startTime",
// 				"stopTime",
// 				"duration",
// 				"fileReferenceID",
// 				"scriptLogAvailable",
// 				"scriptLogLocation",
// 				"scriptLogSize",
// 				"privileges" AS "privileges_u1",
// 				"__FK_lastExecutionResult",
// 				"__KEY_lastExecutionResult",
// 				(SELECT 
// 					"id" AS "id_u0",
// 					"detailsType",
// 					"message",
// 					"detailCreatedDate",
// 					"privileges" AS "privileges_u0",
// 					"__FK_details"
// 				FROM "details" FK "__FK_details")
// 			FROM "lastExecutionResult" PK "__KEY_lastExecutionResult" FK "__FK_lastExecutionResult")
// 		FROM "operational" PK "__KEY_operational" FK "__FK_operational_u0")
	FROM "reloadTask" PK "__KEY_reloadTask" FK "__FK_reloadTask"),
	(SELECT 
		"id" AS "id_u7",
		"name" AS "name_u0",
		"taskType" AS "taskType_u0",
		"enabled" AS "enabled_u0",
		"taskSessionTimeout" AS "taskSessionTimeout_u0",
		"maxRetries" AS "maxRetries_u0",
		"privileges" AS "privileges_u7",
		"__FK_userSyncTask",
		"__KEY_userSyncTask"//,
// 		(SELECT 
// 			"id" AS "id_u6",
// 			"nextExecution" AS "nextExecution_u1",
// 			"privileges" AS "privileges_u6",
// 			"__FK_operational_u1",
// 			"__KEY_operational_u0",
// 			(SELECT 
// 				"id" AS "id_u5",
// 				"executingNodeName" AS "executingNodeName_u0",
// 				"status" AS "status_u0",
// 				"startTime" AS "startTime_u0",
// 				"stopTime" AS "stopTime_u0",
// 				"duration" AS "duration_u0",
// 				"fileReferenceID" AS "fileReferenceID_u0",
// 				"scriptLogAvailable" AS "scriptLogAvailable_u0",
// 				"scriptLogLocation" AS "scriptLogLocation_u0",
// 				"scriptLogSize" AS "scriptLogSize_u0",
// 				"privileges" AS "privileges_u5",
// 				"__FK_lastExecutionResult_u0",
// 				"__KEY_lastExecutionResult_u0",
// 				(SELECT 
// 					"id" AS "id_u4",
// 					"detailsType" AS "detailsType_u0",
// 					"message" AS "message_u0",
// 					"detailCreatedDate" AS "detailCreatedDate_u0",
// 					"privileges" AS "privileges_u4",
// 					"__FK_details_u0"
// 				FROM "details" FK "__FK_details_u0")
// 			FROM "lastExecutionResult" PK "__KEY_lastExecutionResult_u0" FK "__FK_lastExecutionResult_u0")
// 		FROM "operational" PK "__KEY_operational_u0" FK "__FK_operational_u1")
	FROM "userSyncTask" PK "__KEY_userSyncTask" FK "__FK_userSyncTask")
FROM JSON (wrap on) "root" PK "__KEY_root";

Map_IncrementOption_Label:
mapping Load * inline
[ Increment Option, Increment Label
     0, Once
    1, Hourly
    2, Daily
    3, Weekly
    4, Monthly]
;

Map_IncrementOption_Unit:
mapping Load * inline
[ Increment Option, Increment Unit
     0, Once
    1, Hour(s)
    2, Day(s)
    3, Week(s)
    4, Month(s)]
;
    

 

It works pretty well but there is a big issue : the increment option field is the one set at the creation, not the current one. So, when a user moves a trigger from once to daily, the field remains at once.

Please update this field, it seems sooooo easy.

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision
Tags (2)
2 Comments
Meghann_MacDonald

From now on, please track this idea from the Ideation portal. 

Link to new idea

Meghann

NOTE: Upon clicking this link 2 tabs may open - please feel free to close the one with a login page. If you only see 1 tab with the login page, please try clicking this link first: Authenticate me! then try the link above again. Ensure pop-up blocker is off.

Ideation
Explorer II
Explorer II
 
Status changed to: Closed - Archived