On data export for a data model, you can use processing transformations to do calculations in the target database. A processing transformation contains one or several SQL statements which define the transformation actions to be done.

You can have processing transformations executed before or after exporting data:

  • Pre-export transformations: Used to do calculations on the metadata in the target database. For example, on enumerations or labels.
  • Post-export transformations: Used to do calculations based on the data that has just been exported to the target database.

Usually, a transformation is created in SQL and then the file is uploaded to the Data templates and transformations. On upload, a new transformation is created or an existing transformation is overwritten. You can also manually create a transformation on the Data templates and transformations page, and create or copy the SQL statements to the Definition field.


Standard procedure

1. Go to Data modeling studio > Data modeling studio > Data templates and transformations.
2. Sub-task: Upload processing transformation.
  2.1 Click Upload.
  2.2 On the dialog, browse for and select the desired compressed (zipped) folder or single processing transformation file.
  Click Upload.
 

Note: If you select a compressed (zipped) folder with several data templates and transformations, all these data templates and transformations are considered for upload.

  2.3 If a data template or transformation:
- Does not exist, it is created.
- Already exists, you get a message to indicate if it must be overwritten or not.
  Click the desired action: 'Yes' or 'No'.
  2.4 On the Data templates and transformations page, in the list, find and select the uploaded transformation.
  2.5 Click Edit.
  2.6 In the Description field, type or edit the description.
  2.7 In the Category field, select 'Processing'.
3. Sub-task: Create processing transformation.
  3.1 On the Data templates and transformations page, click New.
  3.2 In the Template field, type a value.
  3.3 In the Description field, type a value.
  3.4 In the Category field, select 'Processing'.
  3.5 In the Type field, select 'T-SQL'.
  3.6 Expand the Definition section.
  3.7 In the Definition field, create or copy the desired SQL statements.
4. Close the page.

Notes

In the SQL statements, you can use variables. On export, these variables are replaced with a value. You can use these variables:

  • $MODEL$: Is replaced with the name of the exported data model.
  • $SCHEMA$: Is replaced with schema name as defined for the exported data model.
  • $EXECUTIONID$: Is replaced with the execution GUID that is assigned to the export of the data model.

Related to Notes

Set up transformations

 

Provide feedback