SQL Script

Overview

A SQL Script is a repository entity that stores custom SQL code and the execution point where that code runs in AnalyticsCreator. SQL scripts are typed so they can run around database creation, deployment, workflow execution, or repository extension processing.

Function

Use the SQL Script entity to maintain script metadata such as script type, script name, description, sequence number, active state, script text, and workflow-package assignments.

Script type controls when the script is used. Available types are Pre-creation, Post-creation, Pre-workflow, Post-workflow, Pre-deployment, Post-deployment, and Repository extension. Sequence number controls ordering within the script type, and Inactive keeps a script stored without running it.

The script editor supports an editable Original view and a read-only Parsed view that shows the script after macro parsing. Pre-workflow and Post-workflow scripts can also be assigned to workflow packages through the Package and Run grid.

When a script is saved, AnalyticsCreator validates the script name, sequence number, and script text, stores the script metadata, updates workflow-package script links, and refreshes the repository navigation tree.

Access

SQL scripts can be opened from the ETL ribbon tab, from the Scripts branch in the repository navigation tree, from the scripts list, or from a script node in the navigation tree.

How to access

Navigation tree

Data warehouse -> Scripts -> SCRIPT TYPE -> SCRIPT

Toolbar

ETL -> List -> Scripts

Diagram

Not applicable.

Visual element

Scripts list, SQL Script detail page, and script nodes in the repository navigation tree.

Screen overview

The SQL Script detail page contains the following visible fields, grids, and actions.

ID Property Description
1Script typeExecution point for the script. Available values are Pre-creation, Post-creation, Pre-workflow, Post-workflow, Pre-deployment, Post-deployment, and Repository extension.
2NameScript name. Saving requires a non-empty value.
3DescriptionFree-text description for the script.
4Sequence numberNumeric run order for scripts within the same script type. Saving requires a valid number when the field is filled.
5InactiveKeeps the script stored but disables it for execution.
6OriginalEditable SQL script text. Saving requires a non-empty script.
7ParsedRead-only preview of the script after macro parsing.
8Package / RunWorkflow-package assignment grid shown for Pre-workflow and Post-workflow scripts. Package shows the workflow package name, and Run marks whether the script is assigned to that package. Clicking the Run column header toggles all Run selections.
9SaveValidates and saves the script, updates package-script assignments, refreshes the navigation tree, and reloads the saved detail page.
10CancelReturns to the previous page. If there are unsaved changes, AnalyticsCreator asks whether to save or cancel the navigation.

List behavior

  • The scripts list filters by script name.
  • When the list is opened from a script-type branch, it is filtered to that script type. The ETL ribbon button opens the unfiltered scripts list.
  • The list grid shows status, Name, Type, hidden SeqNr, and Description.
  • Double-clicking a script row opens the selected script in the SQL Script detail page.
  • New opens the SQL Script detail page for a new script. Delete removes the selected script after confirmation.
  • The up and down actions swap the selected script sequence with the adjacent row when both rows have the same script type.

SQL Script actions

  • The Scripts branch provides Refresh, Import script from file, and Import script from cloud.
  • The script-type branches provide Refresh, a type-specific list action, and a type-specific add action.
  • The Repository extension scripts branch also provides Run repository extension scrips for active repository-extension scripts.
  • A selected script provides Edit script, Delete script, Export script to file, and Export script to cloud.

Related topics