Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [ETL] There is an ETL Metamodel?(There is an ETL Metamodel?)
icon4.gif  [ETL] There is an ETL Metamodel? [message #1707066] Wed, 02 September 2015 01:53 Go to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
Hello everyone,

I'm really interested in doing an application; however, I'm unsure if there is an ETL Metamodel or if ETL works without one and it's executed using an API or something different. Does anyone knows if there is an actual ETL MM?

Thanks
Re: [ETL] There is an ETL Metamodel? [message #1707099 is a reply to message #1707066] Wed, 02 September 2015 10:16 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2175
Registered: July 2009
Location: York, UK
Senior Member

Hi Nicolas,

ETL does not have an Ecore metamodel but it does have a fine-grained Java API.

Cheers,
Dimitris
Re: [ETL] There is an ETL Metamodel? [message #1707184 is a reply to message #1707099] Wed, 02 September 2015 21:59 Go to previous messageGo to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
Dimitris Kolovos wrote on Wed, 02 September 2015 10:16
Hi Nicolas,

ETL does not have an Ecore metamodel but it does have a fine-grained Java API.

Cheers,
Dimitris


Thank you Dimitris, do you know if there's any documentation for that API or anyway I can browse so I can use its basis in my app?

Thanks
Re: [ETL] There is an ETL Metamodel? [message #1707185 is a reply to message #1707184] Wed, 02 September 2015 22:11 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2175
Registered: July 2009
Location: York, UK
Senior Member

Hi Nicolas,

There's no documentation of the API but it's self-explaining Wink I'd suggest working with the latest interim release as the API has been reworked substantially since 1.2.

Cheers,
Dimitris
Re: [ETL] There is an ETL Metamodel? [message #1707186 is a reply to message #1707185] Wed, 02 September 2015 22:12 Go to previous messageGo to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
Thank u Kolovos, you had being really kind.
Re: [ETL] There is an ETL Metamodel? [message #1708113 is a reply to message #1707186] Mon, 14 September 2015 00:16 Go to previous messageGo to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
I've one extra question, could someone explain me how can I access and view this API?
Re: [ETL] There is an ETL Metamodel? [message #1708148 is a reply to message #1708113] Mon, 14 September 2015 09:26 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2175
Registered: July 2009
Location: York, UK
Senior Member

Hi Nicolas,

The entry point to the API is EtlModule. A quick example appears below (valid against the current version of the code in the Git repository / the new interim version that will appear within the next few hours - version number should be 1.3.0.20150914...):

public static void main(String[] args) throws Exception {
		
	EtlModule module = new EtlModule();
	module.parse(new File("..."));
		
	if (!module.getParseProblems().isEmpty()) return;
		
	module.getTransformationRules(); // Returns a list of transformation rules
	TransformationRule rule = module.getTransformationRules().get(0);
	rule.getBody(); // Returns the body of the first rule
	rule.getGuard(); // Returns the guard of the first rule
		
}


As I mentioned in a previous post this API is under active development so if you spot any omissions please let us know.

Cheers,
Dimitris
Re: [ETL] There is an ETL Metamodel? [message #1708960 is a reply to message #1708148] Tue, 22 September 2015 20:46 Go to previous messageGo to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
Thank you very much Dimitris! I'll let you know if I find anything Smile
Re: [ETL] There is an ETL Metamodel? [message #1720428 is a reply to message #1708960] Mon, 18 January 2016 15:20 Go to previous messageGo to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
Dimitris I honestly have no idea about how to proceed here, should I be checking the jar files inside the Eclipse folder? Or where can I view the API? I'd really appreciate your help here.
Re: [ETL] There is an ETL Metamodel? [message #1720824 is a reply to message #1720428] Thu, 21 January 2016 09:56 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2175
Registered: July 2009
Location: York, UK
Senior Member

Hi Nicolas,

There's no Javadoc for the interim version I'm afraid [1] so your best bet would be to import the plugins of interest (e.g. o.e.e.etl.engine, o.e.e.eol.engine) as source projects through the Plug-ins view of Eclipse and explore their API by navigating through their source code.

Cheers,
Dimitris

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=486230

[Updated on: Thu, 21 January 2016 09:57]

Report message to a moderator

Re: [ETL] There is an ETL Metamodel? [message #1721010 is a reply to message #1720824] Fri, 22 January 2016 14:21 Go to previous messageGo to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
Thank you Dimitris, I'll give it a try and let you know how it goes Smile
Re: [ETL] There is an ETL Metamodel? [message #1721322 is a reply to message #1721010] Tue, 26 January 2016 15:24 Go to previous messageGo to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
Dimitris, how can I install the latest 1.3.XXXXX version of Epsilon? I can download the entire repo from git, but I'll be getting some issues due to incompatibilities between plugins from 1.2 and the two your suggested in 1.3. From Epsilon site only 1.2 appears as stable.
Re: [ETL] There is an ETL Metamodel? [message #1721323 is a reply to message #1721322] Tue, 26 January 2016 15:26 Go to previous messageGo to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
Nevermind: http://download.eclipse.org/epsilon/interim/
Re: [ETL] There is an ETL Metamodel? [message #1721659 is a reply to message #1721323] Thu, 28 January 2016 23:16 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2175
Registered: July 2009
Location: York, UK
Senior Member

Hi Nicolas,

Javadoc for the latest interim version is now available under http://download.eclipse.org/epsilon/interim-javadoc/ in case it's of any help.

Cheers,
Dimitris
Re: [ETL] There is an ETL Metamodel? [message #1721743 is a reply to message #1721659] Fri, 29 January 2016 16:56 Go to previous messageGo to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
Thanks Dimitris, it indeed helps. I've made some progress, but currently I'm kind of stuck with getting the number of source and target model from the ETL file, could you tell me if it's possible to get that information from EtlModule?

Thanks Smile
Re: [ETL] There is an ETL Metamodel? [message #1721758 is a reply to message #1721743] Fri, 29 January 2016 21:11 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2175
Registered: July 2009
Location: York, UK
Senior Member

Hi Nicolas,

The ETL syntax supports model declaration statements. For example you can add the following at the top of the Tree2Graph transformation [1] to declare the Tree and Graph models.

model Tree driver EMF {metamodelUri="Tree"};
model Graph driver EMF {metamodelUri="Graph"};


Model declaration statements are currently ignored at runtime - and hence are undocumented - but they're essential for static analysis (which is still work in progress).

To identify source/target models, you could add additional key-value pairs to model declarations (see below) or deduce this by inspecting the rules of the transformation.

model Tree driver EMF {metamodelUri="Tree", role="source"};


Cheers,
Dimitris

[1] https://git.eclipse.org/c/epsilon/org.eclipse.epsilon.git/tree/examples/org.eclipse.epsilon.examples.tree2graph
Re: [ETL] There is an ETL Metamodel? [message #1721900 is a reply to message #1721758] Mon, 01 February 2016 14:49 Go to previous messageGo to next message
Nicolas   is currently offline Nicolas Friend
Messages: 38
Registered: October 2014
Member
Thank you very much, I've another question, I've tried using:

TransformationRule rule = module.getTransformationRules().get(j);
String body = rule.getBody();

But the getBody methods returns an "ExecutableBlock" which extends other methods and as far as I've checked there is no way to actually retrieve the content of the rule? I mean an String which includes the entire rule? Is that possible?

Re: [ETL] There is an ETL Metamodel? [message #1722190 is a reply to message #1721900] Wed, 03 February 2016 10:06 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 597
Registered: January 2010
Location: Birmingham, UK
Senior Member

If you use rule.getBody().getBody(), you get access to an AST that you can rebuild the code from. Maybe you could use the region in the root AST node to quickly get at the range of characters that cover the rule?
Previous Topic:EVL: How to change a property type
Next Topic:EVL: How to restrict a context evaluation
Goto Forum:
  


Current Time: Sat May 11 21:13:46 GMT 2024

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

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

Back to the top