Translating SQL into KM3 using AMW and ATL - HowTo

This example contains a weaving model between a SQL DDL (Data Definition Language) metamodel and a KM3 metamodel. The weaving model is used to produce an ATL transformation that translates SQL DDL models into KM3 models. We used an SQL extracted from Mantis bug tracker.


Loading the weaving model into AMW:

The weaving model (models/mw_sql_km3.amw) can be loaded by double-clicking on the file or by using the wizard.

When using the wizard, there are two metamodel extensions that need to be loaded : "mw_base_ext" and "metamodels/mmw_sql_km3". The complete weaving metamodel is saved at metamodels/mmw_sql_km3.ecore
This step is not necessary to execute the transformations.
Left metamodel: metamodels/SQLDDL.ecore.
Right metamodel: metamodels/KM3.ecore.

Executing the transformations

There is an Ant Script (scripts/executeAll.xml) that takes the models/mantis.sql file, and automatically produces a KM3 file. It executes the following actions: