The TDV Studio contains a built-in procedure name "RenameResource" at the path "/lib/resource/RenameResource". This procedure can be called from a SQL script to rename the resources present in TDV. The procedure can be used to rename resources of the type "CONTAINER", "DATA_SOURCE", "DEFINITION_SET", "LINK", "PROCEDURE', "TABLE", "TREE", and "TRIGGER".
Below is a sample procedure used to update a view and a folder present inside TDV Studio:
PROCEDURE RenameResourceProc()
BEGIN
CALL /lib/resource/RenameResource('/shared/Test_View','TABLE','TestView');
CALL /lib/resource/RenameResource('/shared/Test_Folder','CONTAINER','TestFolder');
END
Below is the order in which the parameters passed in the above RenameResource procedure:
1. Resource Path along with the resource name
2. Resource Type
3. New Resource Name