|
Re: [ETL] Using custom tools in standalone [message #1062541 is a reply to message #1062539] |
Sat, 08 June 2013 14:12 |
|
Hi Christophe,
The built-in ETL transformation trace may be of use here (module.getContext().getTransformationTrace()). If this doesn't cover your needs you'll need to add the following line of code before module.execute() to enable ETL to discover your extension point-based tools:
module.getContext().getNativeTypeDelegates().add(new ExtensionPointToolNativeTypeDelegate());
Cheers,
Dimitris
|
|
|
|
|
Re: [ETL] Using custom tools in standalone [message #1063145 is a reply to message #1062543] |
Wed, 12 June 2013 13:21 |
Christophe g Messages: 14 Registered: March 2013 |
Junior Member |
|
|
Hey dimitris,
My idea was not to modifiy the trace, but just to add manually some elements inside of it. In fact, to be more clear, I just want to create some "Transformation" object inside my ETL file and then to add them manually to the current trace. Is it possible ?
If not, then I'll try making my own trace with a custom tools. There is something I don't understand for the tool. Cant he tool be any java fil extending "abstract tool" and be placed on any folder, or does it have to be something specific on it's own folder ?
I don't really understand how to create my own tools from the example, the instruction to register any ecore file and to compile don't seem to apply to this example. Can you maybe explain a bit more how I could call this example in one of my ETL script ? (for example, it would really help me just to be able to call the tool in the standalone example).
Thanks for your help,
Christophe
|
|
|
Re: [ETL] Using custom tools in standalone [message #1063148 is a reply to message #1063145] |
Wed, 12 June 2013 13:39 |
|
Hi Christophe,
I'm afraid there's no out-of-the-box support for modifying the transformation trace in ETL. To do this you'll need to use a custom tool.
Is your Java code meant to run in the context of a plugin or in a standalone Java application?
Cheers,
Dimitris
|
|
|
|
|
Re: [ETL] Using custom tools in standalone [message #1063806 is a reply to message #1063161] |
Fri, 14 June 2013 10:43 |
Christophe g Messages: 14 Registered: March 2013 |
Junior Member |
|
|
Hi Dimitris,
Thanks to your link and your help, I've managed to create my tool and to make it work.
However, I do now have another issue:
I use Epsilon to perform a transformation between two models within Xtext. Thus, the workspace used at run time is not the same one as the one containing the tool.
This was already a problem for the standalone use of ETL, when calling the ETL file. I managed to solve it by using the "URI.create("platform:plugin/...." method to find the ETL file.
The issue I have now is that the transformation does not recognize the tool when executed from that second workspace. The error message is the following:
"Caused by: Type 'custom.trace.epsilon.ETLTrace' not found (platform:plugin/epsilon.lares/epsilon/etl/param2basic.etl@8:23)"
This of course correspond to the call to the tool. I call the tool via "var trace = Native("custom.trace.epsilon.ETLTrace").createInstance();"
This works perfectly when I'm calling it from Java code in the same workspace.
Any idea on how to call the tool in a standalone executed from some java code in another workspace ?
I know this is a bit confused and difficult to explain, if it is not clear, tell me and I'll explain again.
Thanks for your help.
Christophe
[Updated on: Fri, 14 June 2013 10:44] Report message to a moderator
|
|
|
|
|
|
|
Re: [ETL] Using custom tools in standalone [message #1064048 is a reply to message #1064046] |
Mon, 17 June 2013 11:56 |
|
Hi Christophe,
In the standalone mode the class is picked up from the classpath based on its fully-qualified name (plugin.xml doesn't come into play at all). When running as a plugin it's not found as there's no tool extension with that class name.
Cheers,
Dimitris
|
|
|
Powered by
FUDForum. Page generated in 0.04561 seconds