"schema.configure": "<MyUserProvidedService>/<MySchemaName>"
"remote.configure": "<MyUserProvidedService>/<MyRemoteSourceName>"
DO BEGIN
DECLARE VAR_T_NO_FILESFOLDERS TABLE LIKE _SYS_DI.T_NO_FILESFOLDERS;
DECLARE VAR_PARAMETERS TABLE LIKE _SYS_DI.TT_PARAMETERS;
DECLARE VAR_DEPLOY_PATHS _SYS_DI.TT_FILESFOLDERS;
DECLARE VAR_UNDEPLOY_PATHS _SYS_DI.TT_FILESFOLDERS;
DECLARE VAR_PATH_PARAMETERS _SYS_DI.TT_FILESFOLDERS_PARAMETERS;
DECLARE RESULT _SYS_DI.TT_FILESFOLDERS_METADATA;
DECLARE RETURN_CODE INT;
DECLARE REQUEST_ID BIGINT;
DECLARE MESSAGES _SYS_DI.TT_MESSAGES;
DECLARE MESSAGES_ALL _SYS_DI.TT_MESSAGES;
DECLARE CURSOR C_CONTAINER FOR
SELECT CONTAINER_NAME
FROM "_SYS_DI#SYS_XS_HANA_BROKER"."M_CONTAINERS";
FOR CUR_CONTAINER AS C_CONTAINER
DO
VAR_T_NO_FILESFOLDERS = select * from _SYS_DI.T_NO_FILESFOLDERS;
CREATE LOCAL TEMPORARY COLUMN TABLE #PARAMETERS LIKE _SYS_DI.TT_PARAMETERS;
INSERT INTO #PARAMETERS ( KEY, VALUE ) VALUES ('ignore_folders', 'true');
INSERT INTO #PARAMETERS ( KEY, VALUE ) VALUES ('recursive', 'true');
VAR_PARAMETERS = select * from #PARAMETERS;
EXEC 'CALL ' || CUR_CONTAINER.CONTAINER_NAME || '#DI.LIST_DEPLOYED(:VAR_T_NO_FILESFOLDERS, :VAR_PARAMETERS, :RETURN_CODE, :REQUEST_ID, :MESSAGES, :RESULT);' INTO RETURN_CODE, REQUEST_ID, MESSAGES, RESULT USING VAR_T_NO_FILESFOLDERS, VAR_PARAMETERS;
DROP TABLE #PARAMETERS;
VAR_DEPLOY_PATHS = SELECT PATH FROM :RESULT WHERE PATH LIKE '%hdbsynonym' OR PATH LIKE '%hdbsynonymconfig' OR PATH LIKE '%hdiconfig' OR PATH LIKE '%hdbvirtualtableconfig' OR PATH LIKE '%hdbvirtualtable';
CREATE LOCAL TEMPORARY COLUMN TABLE #UNDEPLOY_PATHS LIKE _SYS_DI.TT_FILESFOLDERS;
VAR_UNDEPLOY_PATHS = select * from #UNDEPLOY_PATHS;
CREATE LOCAL TEMPORARY COLUMN TABLE #PATH_PARAMETERS LIKE _SYS_DI.TT_FILESFOLDERS_PARAMETERS;
VAR_PATH_PARAMETERS = select * from #PATH_PARAMETERS;
CREATE LOCAL TEMPORARY COLUMN TABLE #PARAMETERS LIKE _SYS_DI.TT_PARAMETERS;
VAR_PARAMETERS = select * from #PARAMETERS;
EXEC 'CALL ' || CUR_CONTAINER.CONTAINER_NAME || '#DI.MAKE(:VAR_DEPLOY_PATHS, :VAR_UNDEPLOY_PATHS, :VAR_PATH_PARAMETERS, :VAR_PARAMETERS, :RETURN_CODE, :REQUEST_ID, :MESSAGES);' INTO RETURN_CODE, REQUEST_ID, MESSAGES USING VAR_DEPLOY_PATHS, VAR_UNDEPLOY_PATHS, VAR_PATH_PARAMETERS, VAR_PARAMETERS;
DROP TABLE #UNDEPLOY_PATHS;
DROP TABLE #PATH_PARAMETERS;
DROP TABLE #PARAMETERS;
MESSAGES_ALL= SELECT * FROM :MESSAGES_ALL UNION ALL SELECT * FROM :MESSAGES WHERE SEVERITY='ERROR';
END FOR;
SELECT * FROM :MESSAGES_ALL;
END;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |