This MettleCI capability takes a specified set of input ISX files and modifies them based on instructions provided in a supplied YAML file. The first public interface to the Transmuter function will be made available from the MettleCI command line.
Command
From command-shell, run asset-transformer transform
with these parameters:
isx: path to an ISX archive or directory containing archives
user: DataStage user to credit changes to
transforms: path to a YAML file describing transforms to perform
YAML file
This file should contain a list at the top level.
Each item in the list should have a property transform
, containing the name of
a transform, and other properties required by that transform.
E.g:
- transform: AppendToAttribute xpath: //contains_JobObject[@stageType]/@name appendString: _I_AM_STAGE - transform: PrependToAttribute xpath: //contains_JobObject[@stageType]/@name prependString: MY_NAME_IS_
Transforms
The functions from which Recipes will be built are described below:
Transform | Description | Parameters |
---|---|---|
AddJobParameter | Adds a named parameter to one or more specified jobs |
|
RemoveJobParameter | Removes a named parameter from one or more specified jobs |
|
AppendToAttribute | Append a string value to an attribute. |
|
PrependToAttribute | Prepend a string value to an attribute. |
|
SearchAndReplace | Perform a regex search/replace on a text node (i.e. attribute or element with text content). If an element with child elements is provided by the xpath, the child elements will all be removed by this operation. |
|
InsertElement | Adds an XML element as a child to a specified parent element. |
|
InsertAttribute | Adds an attribute to an XML element. If the attribute already exists it will be overwritten. |
|
RemoveElement | Removes an XML element from the document. |
|
RemoveAttribute | Removes an attribute from an existing element. |
|
Recipes
Name | Config File | Description |
---|---|---|
Change prefetch memory |
| Change the prefetch memory setting for an ORAOCI9 stage to 102,400,000 |
Add unit test parameter |
| Add the $DM_ENABLE_UNIT_TESTING parameter to all jobs in the target folder structure |
Remove unit test parameter |
| Remove the $DM_ENABLE_UNIT_TESTING parameter from jobs in the target folder structure that have it |
Change library path and file type |
| Search the modulePath attribute (of parallel routine definitions, typically) for a given pattern, and replace it with a different directory path, keeping the base name of the file but changing the extension from .o to .so. This changes a statically linked routine to dynamic, helping ensure coherence of routine definitions and routine implementations. Shows how to use the SearchAndReplace transform. |
Fix ODBC SQL placeholder issue |
| This recipe fixes an issue where the following warning is displayed when
NOTE: This warning can occur due to a genuine bug in the job in which case this recipe will not fix it. This is a fix for a specific, unusual scenario (described in the yaml file). |