Skip to main content

Celonis Product Documentation

Creating transformation templates

You can use transformation templates to speed up the process of creating several similar transformations for object types or event types. Templates are especially useful if you are modeling multiple flavors of the same event (for example, delivery dispatch by different shipping methods), or if you are transforming data from multiple data sources to create the same objects or events. When you create a transformation for an object type or an event type, you can choose to create it from a template. A transformation that’s created from a template is called a transformation instance.

  • Transformation templates can include attribute scripts, relationship scripts, and change scripts. You can’t add scripts in a transformation instance that aren’t in the original template.

  • The content from a transformation template remains read-only in transformation instances that you create from it. If you edit the template, the changes are applied in all of the instances.

  • To get the best out of transformation templates, include local parameters in them for the parts that you expect to vary, such as the source system name or a table name. For each transformation instance that you create from a template, you can then just go to the list of local parameters in the transformation editor, and add the correct values for that transformation.

  • You can use partial overwrites if you need further customization for a transformation instance - for example because a source system holds the data for an attribute in a different way. Partial overwrites work like overwrites for a Celonis catalog transformation, and they remain in effect when you edit the template.

The Templates tab in the Transformations area of the Objects and Events environment lists your transformation templates and lets you create, edit, rename, and delete them. You can also see the transformation instances that you've created using each template. You can’t create transformation instances from this tab - follow the instructions in Creating custom transformations to do that.

Here’s how to work with transformation templates:

  1. From the Celonis navigation bar, select Data > Objects and Events. Click Transformations in the top navigation to go to the Transformations page, and select the Templates tab.

  2. To create a new transformation template, click the Create template button.

  3. Select the radio button for Objects if the template is for an object type, or Events if it’s for an event type.

  4. Start typing the name of an object or event you want to base the template on and pick it from the list, then click Next. The transformation editor opens, and you'll see a Template label next to the transformation name.

  5. If you want to change the name of the transformation template, click it and enter a new name, then select the check box. The generated name is made from the data source name and a unique number.

  6. Create the attribute scripts, relationship scripts, and change scripts that you want to include in the template. You can’t add a script in an instance if it isn’t in the original template, so make sure to include all the scripts you’ll need. We’ll include a suggested attribute script for the object type or event type that you based the template on.

  7. Write the SQL query for each script. Make sure to use local parameters wherever you can for the parts of the script that you expect to vary. Creating custom transformations has more tips to help you use the SQL editor.

  8. Click Save when you've written all the scripts you want in your transformation template.

  9. Click Transformations in the navigation bar to go back to the Templates tab of the Transformations page. You'll find your template in the list.

  10. To edit a transformation template, click the context menu (the three vertical dots) in its row and select Edit. If you've created any transformation instances from the template, the edits you make are applied immediately in all the instances.

  11. To rename a transformation template, click the context menu and select Rename. Type a new name for the template and click Accept. You can also change its description (select Edit Description in the context menu).

  12. To discard a transformation template, click the context menu and select Delete. You can't delete a template that has any transformation instances using it - check under Instances to see if there are any. You'll have to go to the Transformations tab, find and delete the instances there, then go back to the Templates tab and delete the template.

Follow the instructions in Creating custom transformations to create transformations using your templates. In transformation instances, the template content is read-only, but you can:

  • Change the name of the transformation instance, which defaults to the name of the template, the name of the data source, and a unique number.

  • Change the data source by picking a new one from the dropdown.

  • Fill in the correct values for local parameters.

  • Create a partial overwrite for any parts of the template scripts that you need to change for this transformation instance.

The list of transformations in the Transformations tab tells you if a transformation was created from a template, and you can click the template name to edit it.

If there’s an issue in a transformation that was created from a template, always check the template first and fix any issues in there. When you edit and save a transformation template, the changes are applied immediately to all the instances created from the template.  If an instance includes a partial overwrite, that stays in effect when the template changes. If a transformation instance is still showing issues, check the partial overwrites, local parameter values, and data source in the instance, to make sure they are all correct and still compatible with the current state of the template.