A good skill to have with Data Modeler is JavaScript: using that you can change the way the tool works and you can automate many things. Where can I use those skills? There are two places in Data Modeler: Transformations and Table DDL Transformations.
Transformations
Transformations can be used to change the design. For instance while Engineering to Relational you could add columns to a table. Usually those columns are of a type of technical columns (for example creator, created, modifier, modified), or columns that should always exist for a type of table based on the methodology used (for example Data Vault defines certain columns to exist for certain kinds of tables: hubs, links and satellites). Or you can use them anywhere in your design to automate changes. To execute a script right-click on the Browser and select Apply Custom Transformation Scripts:
Select the script/scripts from the list and press Apply:
In short: Transformations are used to change the design programmatically.
Table DDL Transformations
Table DDL Transformations can be used to change the DDL Data Modeler generates. The design itself is not changed, only the DDL script. This can be used for example to generate the journaling mechanism (journaling tables and triggers) or DDL scripts for a RDBMS that is not supported by Data Modeler, for instance MySQL.
To use a script defined select it from the list in DDL Generation:
Define the tables that DDL generation you want to be affected by the script:
And Generate the DDL by pressing OK.
In short: Table DDL Transformations are used to change the DDL generated.
Hi Heli, I’d like to write some custom javascript transformations, etc. I know javascript but I can’t find any documentation on the DataModeler object mode – i.e., the methods available, their parameters, etc. Is this available somewhere
Hi Mike
unfortunately that is the case. The only documentation available is in F:\DataModeler 19.2\datamodeler-19.2.0.182.1216-x64\datamodeler\datamodeler\xmlmetadata\doc and in SQLDeveloperDataModelerScripting.doc.
best regards,
Heli
Do you remain yourself, doing your job, or is it a PR move?
Yes, I will always remain myself 🙂 I was working for a DW project and I saved hours/days of work by scripting things. I really learnt to like trasformations.