Model configuration¶
Model¶
Syntax¶
<Model> <ModelNamespaces> <ModelNamespace ... /> </ModelNamespaces> <ModelAttributeInjections> <ModelAttributeInjection ... /> </ModelAttributeInjections> <ModelNodeRemovals> <ModelNodeRemoval ... /> </ModelNodeRemovals> </Model>
Child sections¶
Section | Description |
---|---|
ModelNamespaces | See ModelNamespaces |
ModelAttributeInjection | See ModelAttributeInjection |
ModelNodeRemoval | See ModelNodeRemoval |
ModelNamespaces¶
When a model XML file is used that contains namespaces, the namespaces needed for section model binding, model attribute injection and model node removal need to be specified in the model config.
Syntax¶
<ModelNamespace prefix="..." namespace="..." />
Parameters¶
ModelAttributeInjection¶
Model attribute injection can be used to inject attributes to the model before generation starts. This is usefull for enriching the model with additional information that is needed during generation. An example of model attribute injection is adding ETL specific datatypes to an attribute or column definition, derived from the database datatype that is already present in the model.
Syntax¶
<ModelAttributeInjection modelXPath="..." targetAttribute="..." targetValue="..." targetXPath="..." />
Parameters¶
Parameter | Description | Default | Remark |
---|---|---|---|
modelXPath1 | The XPath to apply on the model to get to the element on which to inject the attribute. | See XPath. | |
targetAttribute1 | The name of the attribute to inject. | If the target attribute is already present in the model it's value will be overwritten | |
targetValue2 | The value of the attribute to inject. | ||
targetXPath2 | The XPath to apply on the model element to get the target value. | See XPath. |
ModelNodeRemoval¶
Model node removal can be used to remove certain elements or attributes from the model before the generation starts. This can be usefull when the model contains more information then should be used in a certain generation step. For example when a source model is automatically extracted from a source system and you don't want to include certain columns in the extraction process, you can remove these nodes from the model before generating.
Syntax¶
<ModelNodeRemoval modelXPath="..." />