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.

You can make a template based on the transformation for a Celonis or custom object type or event type, or you can convert one of your custom transformations into a template. Then when you create a transformation for an object type or an event type, you can choose to create it from one of your 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.

  • When you convert a custom transformation into a template, we make the original transformation into an instance of the template. You can’t do this with a Celonis catalog transformation, but you can do it with a custom transformation that you wrote for a Celonis object type or event type.

  • 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.

  2. Click Transformations in the Objects and Events navigation panel to go to the Transformations page.

  3. To create a new transformation template based on a Celonis or custom object type or event type:

    1. Select the Templates tab and click the Create template button.

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

    3. 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.

  4. To convert a custom transformation into a transformation template:

    1. Choose a custom transformation from the list in the Transformations tab.

    2. If you want to check the transformation first, click it to view it, then select Transformation actions > Convert to template.

    3. To go ahead with creating the template, select Convert to template from the context menu (the three dots) by the transformation name. You’ll get the option to change the name of the template or use the original transformation’s name.

    The original transformation becomes an instance of the new transformation template (which is why you can’t do this with a Celonis catalog transformation).

  5. The transformation editor opens, and you'll see a Template label next to the transformation name. 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 for a new template 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.

    • For a template based on a Celonis or custom object type or event type, we’ll include a suggested attribute script based on the original transformation.

    • For a template based on a custom transformation, you can add more scripts that weren’t in your original transformation.

  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.