In addition to the conventional Windows scripting and other tools, WhereScape RED also supports Windows PowerShell scripts for loading data into a WhereScape RED managed Data Warehouse, as well as for exporting data from a WhereScape RED managed Data Warehouse. 
The Windows PowerShell command line and scripting environment was introduced by Microsoft in Windows 7. For more information about PowerShell, please refer to the Microsoft TechNet website (https://technet.microsoft.com/en-us/library/dd742419.aspx).

Note

WhereScape RED does not automatically create the PowerShell scripts, you must write them either directly via the WhereScape RED script editor or via a template that generates a PowerShell script. Each method is described below.

Via the WhereScape RED Script Editor

You can manually write the PowerShell script from scratch, using the Script Editor. You need to create a Host Script object and set the script type to PowerShell script from the Host Script Properties screen.

You can then open the blank Host Script created of type PowerShell Script to write your own script, or you can use the sample PowerShell scripts in WhereScape RED, which can be generated by selecting Tools > Create Template Script from the Script Editor screen.

The contents generated is an actual PowerShell script syntax that you can use to load data into a WhereScape RED managed Data Warehouse. You can also modify it and use it as a starting point to write your own PowerShell script for Load or Export objects.

RED, now includes the Create Browse Script option. This action adds a sample browse script to the empty script editor window.

Via the Stub Template

WhereScape RED also provides the Template object wsl_common_powershellscript_stub which is a basic PowerShell script type stub template that serves as guide on the use of a template to generate a PowerShell script.

Additional PowerShell Templates can be downloaded from the WhereScape website (https://www.wherescape.com/support/software-downloads-documentation/templates/).
 
You can also create your own Template object and select PowerShell Script under the Type drop-down of the Template Properties screen.

Similar to the WhereScape RED Script Editor method described above, you can edit the template created to write your own script or open an existing PowerShell script to copy its contents to your template.

Note

WhereScape RED uses the 32-bit version of PowerShell by default. To use the 64-bit version, the following code must be added as the first line of the script. The script is relaunched and will be run in 64-bit version.


  • No labels