Exercise 5: Copying a Script to Another Context and Deleting a Script
In this fifth exercise of QPR ProcessAnalyzer ETL Tutorial, you will learn how to copy scripts, change the context of the script and delete a script. Scripts can be easily copied by using the Copy to Clipboard function which allows you to edit the script in Notepad, for example. You can also copy scripts from one project or model to another by using the clipboard.
- Go to Manage Scripts and from the Context drop-down menu, select Project.
- From the Selected Project drop-down menu, select ETL Tutorial. (This is the project from which we want to copy the script.)
- Select the script “Hello World” which we created in Exercise 1 and then click Copy to Clipboard. (You could also select several scripts to be copied at the same time by holding down either the Ctrl key or the Shift key.) Note: If you want to make changes to the script, open a text editor, such as Notepad, and paste the text there. The script is then pasted in XML format. After making the changes, copy the text again. In this exercise, we will not be making changes to the script so we do not have to copy it to a text editor.
- In Manage Scripts, from the Context drop-down menu, select the context where you want to copy the script. In this example, we will select Model and “ETL Example Model” as the model, so the script is now available only for the current model.
- Select Create from Clipboard. You will get the following notification:
- Click Yes. Note that there can be scripts with the same name but their ID is always unique.
- You can see the script has now been copied as a new script to this model.
- Now we will remove the script from the Project context since, for the purposes of this exercise, we do not want it to be in use for other models in this project. To do this, from the Context drop-down menu, select Project.
- From the Selected Project drop-down menu, select ETL Tutorial.
- Select the script “Hello World” and then click Delete. You will get the following notification:
- Click Yes. The script is now permanently deleted from this context but is available in the Model context where we copied it.
Congratulations! You have now successfully completed the QPR ProcessAnalyzer ETL Tutorial.