Templates provide the ability to customize automatically generated code within RED. This feature is most suited to users that would like to customize automatically generated code or would like to expand RED to support non-native database platforms.
Creating templates is an advanced function that requires intimate knowledge of RED operations and metadata structure. WhereScape recommends that you contact our consulting team to assist with this feature. However, should you wish to use this feature independently, example templates and up-to-date reference information is available on our website:
https://www.wherescape.com/support/software-downloads-documentation/wherescape-red/templates/
Some templates may be included in your RED installation, depending on your license.
Each template is assigned a type and a target database, these properties are used to assist with filtering when associating table operations to templates. RED supports templates for the following operations:
Operation | Database | Template Type |
---|---|---|
Alter Table DDL | Custom (on SQL Server, Oracle and Teradata) | DDL |
Create Table DDL | All database types | DDL |
Create Index DDL | Custom (on SQL Server and Oracle) | DDL |
Drop Index DDL | Custom (on SQL Server and Oracle) | DDL |
Export Script | All database types | Windows Script |
PowerShell Script | ||
Unix Script | ||
OLAP/XMLA Script | ||
Load Script | All database types | Windows Script |
PowerShell Script | ||
Unix Script | ||
OLAP/XMLA Script | ||
Update Procedure | Custom (on SQL Server, Oracle and Teradata) | Block |
PowerShell Script | ||
Hive | Block | |
SQL Server, Teradata, Oracle and PDW | Block | |
Procedure | ||
Custom Update Procedure | SQL Server, Teradata and Oracle | Procedure |
Update Script | Custom (on SQL Server, Oracle and Teradata) | PowerShell Script |
Post Load Procedure | Custom (on SQL Server, Oracle and Teradata) | Block |
Hive | Block | |
SQL Server, Teradata, Oracle and PDW | Block | |
SQL Server, Teradata and Oracle | Procedure | |
Post Load Script | Custom (on SQL Server, Oracle and Teradata) | PowerShell Script |
Note
- Script-based loads and exports on Windows, supports both DOS Batch and PowerShell scripts.
- Refer to Rebuilding Update Procedures for details on generating an update procedure via a template.
Utility type templates contain common code for use by other templates.
Templates are written in the Pebble template language—refer to Pebble Templates and Pebble Syntax sections for details.
You can also define default templates to use for the update routines of table objects in RED by Connection type—refer to Connection Routine Templates for details.
Tip
Detailed logs can be produced during template evaluation by typing FULLLOG in the Notes of the relevant connection.