Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Example of running ETL trafo from java?
Example of running ETL trafo from java? [message #1383199] Mon, 26 May 2014 08:54 Go to next message
Scott Finnie is currently offline Scott FinnieFriend
Messages: 94
Registered: October 2011
Member
Hello,

Are there any examples of running an ETL transformation from java? I have it running form an Ant script but want to run natively (per recommendation in this thread).

I found the following snippet (from here):

    URI outputModel = URI.createFileURI("C:/model-gen/model" + i + ".xmi");
    etlExecutor etlExecutor;
    etlExecutor = new etlExecutor("pathToetlSource");
    etlExecutor.addSourceModel("inputModel", inputModel,    URI.createURI("metamodelIn"));
    etlExecutor.addTargetModel("model" + i, outputModel,  URI.createURI("metamodelOut"));
    etlExecutor.execute();


However I can't seem to find the 'EtlExecutor' class (I presume it's a typo above & should be capitalised?). So any pointers would be appreciated; for example:

- I assume the respective input & output metamodels need to be registered before running the transformation?
- Does the execution take care of creating the target model file - or does it need to be created first?
- which packages/bundles need to be imported in plugin.xml?

Many thanks.

Re: Example of running ETL trafo from java? [message #1383226 is a reply to message #1383199] Mon, 26 May 2014 09:06 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Scott,

Please see [1] for an example demonstrating running ETL [2] from Java.

Cheers,
Dimitris

[1] https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/org.eclipse.epsilon.examples.standalone/
[2] https://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/org.eclipse.epsilon.examples.standalone/src/org/eclipse/epsilon/examples/standalone/etl/EtlStandaloneExample.java
Re: Example of running ETL trafo from java? [message #1383286 is a reply to message #1383226] Mon, 26 May 2014 09:42 Go to previous messageGo to next message
Scott Finnie is currently offline Scott FinnieFriend
Messages: 94
Registered: October 2011
Member
Hi Dimitris,

Thanks for the quick response - that's great. And apologies, I should have found them myself (need to practice my googling...!).

-Scott.
Re: Example of running ETL trafo from java? [message #1383346 is a reply to message #1383286] Mon, 26 May 2014 10:19 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Scott,

No worries - glad this helped.

Cheers,
Dimitris
Previous Topic:[EOL/ETL/ECL] How to exchange variables
Next Topic:Broken Link to the Model File in the EGL Tutorial
Goto Forum:
  


Current Time: Fri Apr 26 02:31:21 GMT 2024

Powered by FUDForum. Page generated in 0.03685 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top