Global Scripts

Global Scripts enable certain aspects of the Nectari Data Model Designer, such as using database views, without having direct access to database management tools.

The Global Scripts associated with a Data Model (refer to Data Model Designer for more details) will also be executed when the Data Model is imported in order to create the missing SQL objects.

  • In the Administration section , click on Global Scripts in the left pane.

Manage Scripts

  • In the Global Scripts drop-down menu, select Manage Scripts.

To create a new Script:

  • In the upper left hand corner, click on Create New Script.
    Note

    Whether you click on Create New Script or on to update an existing Script, the same Edit window will appear.

    Example



Description:
Name of the Global Script.
Parameters to Add:
Automatically populated from the list of parameters defined in the Parameters of Scripts, the Parameters can be used to dynamically change the content of the scripts when executed. Subsequently, a Parameter window will appear to let the user enter the values for each parameter in the script.
Script Content:
Contains the query that will run.
Rollback Script Content:
Contains the backup query in case the query in the Script Content does not complete successfully or if the templates are uninstalled.
Server Type:
Indicates the language of the script (T-SQL for either SQL Server, ISeries or Oracle)
Special Script for Template:
Indicates whether this script should be saved in the export as a special script. The special scripts are executed before the scripts specific to the processes. Tick the box for the Data Source menu to appear.
Data Source:
Select the Data Source from the drop-down list. Always execute a script against a data source (setup at the Data Model level).
Create or Update:
Once the form has been completed or changed, click on Update or Create to finish.

Parameters

The Parameters option will list all the parameters defined and applicable from the Global Scripts.

To create a new Script Parameter:

  1. In the upper left hand corner, click on Create New Parameter.
  2. Enter a unique Parameter Name and Description.
  3. Click on Create to finish.
    Note

    The New Script Parameter will appear in the first line of the list.

Once completed:

  1. Go to Env. & Data Sources.
  2. Follow the instructions to Add a new environment to match the Global Script you just created.
  3. Click on the Execute Scripts.
  4. Click on Run to execute the script.