Script Library
Script Library application in DB services app family allows to upload and manage scripts that are used as masking scripts, pre-scripts, and post-scripts. Using this app, you can upload and manage different versions of engine-specific scripts.
Prerequisite
Ensure that you have registered your cloud subscription in the Subscriptions application under the Governance app family.
For more information on cloud subscriptions, see Subscriptions.
Ensure that you have created your database engine-specific scripts.
Introduction
Data processing scripts are used to transform, mask, or alter one or more columns within a database table. Additionally, these scripts can be used to configure database or schema-level settings. In database operations (like backups, refreshes, migrations, or deployments), pre and post scripts are used to prepare and restore the environment safely and consistently.
Data transformation scripts can be designed and developed for use across multiple applications like Availability Machines and so on. For example, you can create a script called 'MASK_1' to mask column X in database table Y. This script can then be used to create masked backups of a database for development or QA purposes.
Scripts are not limited to a single DB service, after creation, they can be used across multiple services.
By default, the application is accessible to the Data Owner role. A script created by one Data Owner is not accessible to another unless explicitly shared.
Tessell supports below types of scripts:
Masking
Pre-script
Post-script
A data processing script has to be a single file (For example, .sql, .sh) to upload in the application.
Script Library dashboard
On the left navigation bar of Tessell portal, select Script Library under DB Services to view the Script Library dashboard. You can filter the list as per the subscriptions, database engine, script types, statuses, and owner.
Dashboard filters have the following fields:
Search - To find and display details of a specific script, specify the name in the search bar. As you type, the list automatically filters and displays script names that match the characters you specify.
Subscriptions - You can choose a cloud subscription from the dropdown list. By default, all the subscriptions are displayed. The possible values are ‘All’ or any specific subscription.
Engine - You can choose a database engine from the dropdown list. By default, all the database engine scripts are listed. The available options are All, MySQL, Oracle, PostgreSQL, SQL Server, and MongoDB.
Script Type - You can choose a script type from the dropdown list. By default, all the script types are listed. The available options are All, Masking, Pre-Script, and Post-Script.
Status - You can choose a script status from the dropdown list. By default, all the script statuses are listed. The available options are All, Enabled, and Pending.
Owner - You can choose a specific username from the dropdown list to view the details of the script specific to that user. By default, all the scripts that are shared with you are listed.
Clear - Select this to clear the selected filters and revert back to default settings.
Upload Script
Click Upload Script on the top right corner of the window.
The ‘Upload script’ dialog box opens.
Specify the script name in the Name field.
Optionally, specify a description for the script in the Description field.
Choose a database engine from the displayed list.
From the Script Type dropdown list, choose a script type.
Click Select File to upload the script file from your local folder.
Only one file can be uploaded.
Maximum file size allowed in 1 MiB.
For masking scripts, .sql file extensions are supported, for pre- and post-scripts, .sql and .sh file extensions are supported.
From the Subscriptions dropdown list, choose the subscriptions for your script.
Click Save to upload the file in the Script Library.
As an alternative method, use code to upload a script.
Use the Code button at the top-right corner to view the code in different languages like Shell, Python, Go, Java, Javascript, and PowerShell. You can also view the corresponding APIs.
You can copy or download the code using the respective buttons in the top-right corner.
Use the Close button at the bottom-right corner to return back to the main window.
Script Library tab displays following columns:
Script Name - Displays the script name you uploaded. If you hover over a script name, a tooltip pops-up with the script description.
Script Type - Displays the type of the script chosen when the script was uploaded, it can be a masking script, pre-script or a post-script.
Subscriptions - Displays the subscriptions selected for the script. An account owner can view all scripts in the script library, as they have access to all subscriptions.
Status - Displays the status of the script, whether Enabled or Pending. By default, all the scripts have Enabled status when we upload a script in the portal. Pending status is displayed when a script is created without a version. This is possible only when you create a script via API calls.
Active Version - Displays the current version selected for the script.
Created on - Displays the date and time of the script upload in the Script Library.
Created By - Displays the username that was used to upload the script.
Ellipsis icon - You can update or delete a script using the ellipsis icon:
To update a script, click the Update option. Following can be modified:
Script's name
Script description
Script active version from the dropdown list.
Subscriptions can be added or removed using this option.
If the subscriptions that are to be removed are not used in any schedules, services, or clones, users can remove the subscription directly through update script.
If a subscription is used in any of schedules, services, or clones. The schedule, services, or clones using the script needs to be deleted first to remove the subscriptions.
To delete a script, click the Delete option. A confirmation dialog box appears, select the check box to confirm the action and then select Delete.
Figure 1 - Script Library dashboard

Script Library home page
Selecting any of the script from the Script Library dashboard takes you to the home page of that script. Dashboard consists of two tabs, Versions and Sharing.
Versions
Use Search bar to search for a specific version from the list, if there is a list of versions available.
Upload new version
Click Upload new version to upload a new version of the script.
The ‘Upload a new version’ dialog box opens.
Specify the script version name in the Name field.
Optionally, specify a description for the script version in the Description field.
Click Select File to upload the script version file from your local folder.
Only one file can be uploaded.
Maximum file size allowed in 1 MiB.
Click Save to upload the new script version file in the Script Library.
Versions table has the following columns:
Name - Displays the script version name.
Version - Displays the version number of the script.
File Name - Displays the name of the script file along with the extension, uploaded from the local folder.
Created On - Displays the date and time of the script version upload in the versions tab.
Ellipsis icon - You can download or delete a script version using the ellipsis icon:
To download an existing script version, click the Download option.
The specific version of the script file is downloaded to your local folder.
To delete a script, click the Delete option. A confirmation dialog box appears, select the check box to confirm the action and then select Delete.
Note: You can only delete a script version if it is not the active one. To delete the current active version, you must set a different version as active, and then proceed with the deletion.
Sharing
The Sharing tab allows you to share your scripts with the other users. A data owner can view only the scripts created by or shared with them.
A data owner with admin access to the DB Services app can view scripts associated with the subscriptions they can access.
You can search the users list by specifying the user’s name in the Search bar on the Sharing tab.
Share
Click Share on the top right corner of the window.
The ‘Add users to your script’ dialog box opens.
From the Role dropdown list, choose a role, possible values are Co-owner and Read-only.
Use the Search bar to search for specific users.
To grant access, select and move the users from the left Choices column and to the right Chosen column.
All personas except the Account Owner who does not have DB Admin access appear in the left Choices column.
Note: Users and roles are managed in IAM application under the Governance app family.
Click Save to share your scripts.
Following details are displayed in sharing tab:
User - Displays a list of usernames with whom the script is shared.
Role - Displays the user's defined role, which can be either Co-owner or Read-only.
Figure 2 - Script Library home page

Last updated
Was this helpful?