How to rename resources from TIBCO Data Virtualization Studio using a procedure?

How to rename resources from TIBCO Data Virtualization Studio using a procedure?

book

Article ID: KB0075353

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 8.2

Description

This articles describes the process of renaming a single resource or multiple resources from TDV Studio using a procedure.

Issue/Introduction

How to rename resources from TIBCO Data Virtualization Studio using a procedure?

Environment

All Supported Operating System

Resolution

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

 

Additional Information

Refer the document in the below link for more information about the "RenameResource" procedure:
https://docs.tibco.com/pub/tdv/8.2.0/doc/pdf/TIB_tdv_8.2.0_APIGuide.pdf?id=11