From 3d40d2797e5ac89ba2b8ccd5bcbaeb750590e978 Mon Sep 17 00:00:00 2001 From: Alik Rakhmonov Date: Wed, 18 Feb 2026 19:58:13 +0100 Subject: [PATCH] HCK-14857: Custom script hooks --- .../container_level/containerLevelConfig.json | 128 ++++++++++++++- .../entity_level/entityLevelConfig.json | 44 +++++ .../model_level/modelLevelConfig.json | 152 ++++++++++++++++++ .../view_level/viewLevelConfig.json | 44 +++++ 4 files changed, 362 insertions(+), 6 deletions(-) diff --git a/properties_pane/container_level/containerLevelConfig.json b/properties_pane/container_level/containerLevelConfig.json index 8b9dbad5..62225aab 100644 --- a/properties_pane/container_level/containerLevelConfig.json +++ b/properties_pane/container_level/containerLevelConfig.json @@ -2,9 +2,9 @@ * Copyright © 2016-2021 by IntegrIT S.A. dba Hackolade. All rights reserved. * * The copyright to the computer software herein is the property of IntegrIT S.A. -* The software may be used and/or copied only with the written permission of -* IntegrIT S.A. or in accordance with the terms and conditions stipulated in -* the agreement/contract under which the software has been supplied. +* The software may be used and/or copied only with the written permission of +* IntegrIT S.A. or in accordance with the terms and conditions stipulated in +* the agreement/contract under which the software has been supplied. In order to define custom properties for any object's properties pane, you may copy/paste from the following, @@ -71,8 +71,8 @@ making sure that you maintain a proper JSON format. ] }, // “groupInput” can have the following states - 0 items, 1 item, and many items. -// “blockInput” has only 2 states - 0 items or 1 item. -// This gives us an easy way to represent it as an object and not as an array internally which is beneficial for processing +// “blockInput” has only 2 states - 0 items or 1 item. +// This gives us an easy way to represent it as an object and not as an array internally which is beneficial for processing // and forward-engineering in particular. { "propertyName": "Block", @@ -100,7 +100,7 @@ making sure that you maintain a proper JSON format. "propertyKeyword": "keyList", "propertyType": "fieldList", "template": "orderedList" - }, + }, { "propertyName": "List with attribute", "propertyKeyword": "keyListOrder", @@ -142,6 +142,122 @@ making sure that you maintain a proper JSON format. "propertyTooltip": "Use this clause to grant object privileges on objects you own to other users.", "propertyType": "details", "template": "textarea" + }, + { + "propertyName": "Custom scripts", + "propertyType": "block", + "propertyKeyword": "customScripts", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Before CREATE SCHEMA", + "propertyKeyword": "beforeCreateContainer", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "After CREATE SCHEMA", + "propertyKeyword": "afterCreateContainer", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "Before each CREATE TABLE", + "propertyKeyword": "beforeCreateEntity", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "After each CREATE TABLE", + "propertyKeyword": "afterCreateEntity", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "Before each CREATE VIEW", + "propertyKeyword": "beforeCreateView", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "After each CREATE VIEW", + "propertyKeyword": "afterCreateView", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + } + ] } ], "containerLevelKeys": [] diff --git a/properties_pane/entity_level/entityLevelConfig.json b/properties_pane/entity_level/entityLevelConfig.json index 75c23389..8a6c2ea9 100644 --- a/properties_pane/entity_level/entityLevelConfig.json +++ b/properties_pane/entity_level/entityLevelConfig.json @@ -866,6 +866,50 @@ making sure that you maintain a proper JSON format. "propertyType": "details", "template": "textarea", "valueType": "string" + }, + { + "propertyName": "Custom scripts", + "propertyType": "block", + "propertyKeyword": "customScripts", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Before CREATE TABLE", + "propertyKeyword": "beforeCreateEntity", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "After CREATE TABLE", + "propertyKeyword": "afterCreateEntity", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + } + ] } ], "columnsRatio": [3.7, 5] diff --git a/properties_pane/model_level/modelLevelConfig.json b/properties_pane/model_level/modelLevelConfig.json index 258b4bb5..3e2d5d1f 100644 --- a/properties_pane/model_level/modelLevelConfig.json +++ b/properties_pane/model_level/modelLevelConfig.json @@ -182,6 +182,158 @@ making sure that you maintain a proper JSON format. "addTimestampButton": false, "propertyType": "details", "template": "textarea" + }, + { + "propertyName": "Custom scripts", + "propertyType": "block", + "propertyKeyword": "customScripts", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Header script", + "propertyKeyword": "headerScript", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "Footer script", + "propertyKeyword": "footerScript", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "Before each CREATE SCHEMA", + "propertyKeyword": "beforeCreateContainer", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "After each CREATE SCHEMA", + "propertyKeyword": "afterCreateContainer", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "Before each CREATE TABLE", + "propertyKeyword": "beforeCreateEntity", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "After each CREATE TABLE", + "propertyKeyword": "afterCreateEntity", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "Before each CREATE VIEW", + "propertyKeyword": "beforeCreateView", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "After each CREATE VIEW", + "propertyKeyword": "afterCreateView", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + } + ] } ] }, diff --git a/properties_pane/view_level/viewLevelConfig.json b/properties_pane/view_level/viewLevelConfig.json index a025ad3d..f6e2d8ad 100644 --- a/properties_pane/view_level/viewLevelConfig.json +++ b/properties_pane/view_level/viewLevelConfig.json @@ -660,6 +660,50 @@ { "propertyKeyword": "pipeline", "hidden": true + }, + { + "propertyName": "Custom scripts", + "propertyType": "block", + "propertyKeyword": "customScripts", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Before CREATE VIEW", + "propertyKeyword": "beforeCreateView", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + }, + { + "propertyName": "After CREATE VIEW", + "propertyKeyword": "afterCreateView", + "propertyType": "block", + "propertyTooltip": "", + "structure": [ + { + "propertyName": "Script", + "propertyKeyword": "script", + "propertyType": "details", + "markdown": false, + "template": "codeEditor", + "templateOptions": { + "editorDialect": "sql" + } + } + ] + } + ] } ] },