ETL execution engine [message #1765197] |
Wed, 07 June 2017 12:44 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi,
I want to know about execution engine of ETL. Is there any reference to help in this regard?
e.g., In the below code when 'Element' class is created? When we execute 'Statemachine2Petrinet' rule and arrive to 'pn.elements ::= sm.elements' statement or when we execute `ModelElem2Element` rule?
rule Statemachine2Petrinet
transform sm: Statemachine!Statemachine
to pn : Petrinet!Petrinet {
pn.elements ::= sm.elements;
}
rule ModelElem2Element
transform mElem : Statemachine!ModelElem
to elem : Petrinet!Element {
guard : mElem.name <> null
elem.name := mElem.name;
}
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Wed, 07 June 2017 12:45] Report message to a moderator
|
|
|
Re: ETL execution engine [message #1765200 is a reply to message #1765197] |
Wed, 07 June 2017 13:16 |
Eclipse User |
|
|
|
Hello,
1. This is the declarative side of ETL. The engine automatically schedules the execution of the rules. You are not supposed to know, or better saying, you do/should not assume any ordering of the execution of the rules. This is decided by the engine.
2. A question to be asked is, I also do not know the answer, is the following a valid ETL statement:
pn.elements ::= sm.elements;
Does it trigger the execution of ModelElem2Element rule for each element in pn's list? Or should you write a for loop to iterate each list element individually?
3. If the ModelElem2Element rule is executed for every element in the list before the Statemachine2Petrinet rule, then the engine uses the result of this execution in the code part
pn.elements ::= sm.elements;
, rather than executing the rule again. Otherwise (if the ModelElem2Element rule is not executed yet), then the ModelElem2Element rule is called when needed.
|
|
|
Re: ETL execution engine [message #1765209 is a reply to message #1765200] |
Wed, 07 June 2017 14:24 |
|
Hi both,
In the absence of lazy rules, ETL runs in 2 passes. In the first pass it creates all target objects and traceability links back to their equivalent source objects and in the second pass, it populates the contents of the target objects by running the bodies of the respective rules.
> Does it trigger the execution of ModelElem2Element rule for each element in pn's list? Or should you write a for loop to iterate each list element individually?
Multi-valued features are handled using a built-in loop so you wouldn't need to write one.
Cheers,
Dimitris
|
|
|
|
Re: ETL execution engine [message #1765253 is a reply to message #1765252] |
Wed, 07 June 2017 20:59 |
|
No - I was referring to the internal traceability links that the ETL engine maintains to be able to compute .equivalent[s](). The trace model in OO2DB is there only to demonstrate that an ETL transformation is not limited to one source and one target model but I can now see how it can be more confusing than helpful :/
Cheers,
Dimitris
|
|
|
|
Re: ETL execution engine [message #1765261 is a reply to message #1765259] |
Wed, 07 June 2017 21:08 |
|
> In the aspect of functionality, I mean; do they the same work?
No. As far as the execution engine is concerned, the Trace model has no special semantics.
> Is there any reference that help to know more about ETL execution engine?
Not really but please feel free to keep asking questions. Perhaps at the end of this discussion you can even put together a relevant article for the Epsilon website ;)
Cheers,
Dimitris
|
|
|
Re: ETL execution engine [message #1766455 is a reply to message #1765261] |
Wed, 21 June 2017 15:11 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Thanks for your kind help.
1. How the engine distinguish between two classes with the same name?
e.g., In these two rules 4 different Column classes should be created and have their own features:
rule Class2Table
transform c : OO!Class
to t : DB!Table, pk : DB!Column {
if (c.`extends`.isDefined()){
var childFkCol : new DB!Column;
var parentFkCol : DB!Column;
}
}
rule SingleValuedAttribute2Column
transform a : OO!Attribute
to c : DB!Column {
....
}
EClass [name=Column, instanceClassName=null, instanceClass=null, defaultValue=null, instanceTypeName=null, abstract=false, interface=false, ] cannot specifies the difference of these classes.
2. When we have an assignment statement that its lhs is a class, what does it do?
parentFkCol = parentTable.primaryKeys.first();
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Thu, 22 June 2017 15:35] Report message to a moderator
|
|
|
|
|
Re: ETL execution engine [message #1766593 is a reply to message #1766534] |
Fri, 23 June 2017 11:20 |
|
> 1. Does the execution engine create 4 columns (EClass) for above code?
It creates 4 instances of Column.
> In the below assignment statement what happens? parentFkCol = parentTable.primaryKeys.first();
The value of the parentFkCol variable becomes the result of evaluating "parentTable.primaryKeys.first()"
Cheers,
Dimitris
|
|
|
Re: ETL execution engine [message #1766594 is a reply to message #1766593] |
Fri, 23 June 2017 11:38 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Dimitris Kolovos wrote on Fri, 23 June 2017 11:20
It creates 4 instances of Column.
That means, we have 4 instances of EClass with the same name in the same package. Since they have not id, how can we distinguish between them?
e.g. I want to add an attribute to EClass that is created with "var parentFkCol : DB!Column;". How can I select this specific class?
Dimitris Kolovos wrote on Fri, 23 June 2017 11:20>
The value of the parentFkCol variable becomes the result of evaluating "parentTable.primaryKeys.first()"
Since parentFkCol is a class (not feature of a class), what happens in the model?
The class should rename and all its features must remove or not happens in the model? if not happens, why?
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Fri, 23 June 2017 11:50] Report message to a moderator
|
|
|
|
|
Re: ETL execution engine [message #1766598 is a reply to message #1766597] |
Fri, 23 June 2017 11:58 |
|
You can 1) access it while the parentFkCol variable is still available, 2) reach it through a navigation path or 3) assign one of its properties and then use that property to look it up.
Cheers,
Dimitris
|
|
|
Re: ETL execution engine [message #1766602 is a reply to message #1766598] |
Fri, 23 June 2017 12:05 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Thank you very much.
Dimitris Kolovos wrote on Fri, 23 June 2017 11:20
The value of the parentFkCol variable becomes the result of evaluating "parentTable.primaryKeys.first()"
Since parentFkCol is a class (not feature of a class), what happens in the model?
The instance of the class should rename and all its properties must remove or not happens in the model? if not happens, why?
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Fri, 23 June 2017 12:07] Report message to a moderator
|
|
|
|
Re: ETL execution engine [message #1767133 is a reply to message #1766604] |
Sat, 01 July 2017 17:37 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi,
Thanks a lot.
I have some more questions:
1.
Dimitris Kolovos wrote on Wed, 07 June 2017 14:24
In the absence of lazy rules, ETL runs in 2 passes. In the first pass it creates all target objects and traceability links back to their equivalent source objects and in the second pass, it populates the contents of the target objects by running the bodies of the respective rules.
when we have lazy rules what changes occur?
2. In the "SpecialAssignmentStatements" or "AssignmentStatements" which have equivalent(s) in their rhs, the engine finds TransformationRule which its source has the special type and selects its target. I want to know:
2.1. If the TransformationRule has more than one target, does the engine select all of its target?
2.2. If we have more than one TrasformationRule that matches the condition, do all of them select?
3. In the "parentTable.primaryKeys.first()" expression, how the execution engine find out to which class "primaryKeys" refers?
My own perception is it finds the eType of primarykeys reference. By the way, I have no idea about the metamodel file it belongs to.
Many thanks for your time,
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Sat, 01 July 2017 17:45] Report message to a moderator
|
|
|
Re: ETL execution engine [message #1767192 is a reply to message #1767133] |
Mon, 03 July 2017 11:52 |
|
Hi,
> when we have lazy rules what changes occur?
In the presence of lazy rules, rules are fully executed (element creation + population) in one go when a .equivalent() is encountered.
2.1 and 2.2 are easy to figure out through experimentation.
Regarding 3, EOL uses reflection on the "parentTable" EObject to retrieve the values of its "primaryKeys" reference.
Cheers,
Dimitris
|
|
|
Re: ETL execution engine [message #1795805 is a reply to message #1767192] |
Sat, 29 September 2018 08:38 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi there,
I have got some rules (rules with no annotations). Assuming they have not any guard or their guards are satisfiable and also we have at least one instance of their source pattern element in the input model, I would like to know the ETL transformation engine runs those rules with which order? Do they run in the same order that they have been appeared in the transformation?
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Sat, 29 September 2018 16:15] Report message to a moderator
|
|
|
|
|
|
Re: ETL execution engine [message #1807582 is a reply to message #1801913] |
Tue, 04 June 2019 08:59 |
Banafsheh Azizi Messages: 328 Registered: July 2016 |
Senior Member |
|
|
Hi there,
I have tested the below code. Surprisingly, It does not have any error.
var s = "1";
switch(s){
case "1": var a = 6;
case "3": var i=0;
i.println();
}
a.println;
In ETL, switch blocks are not distinct scope? I mean to say the variables defined in the case of the switch do not popped from the symbol table after the execution of switch?
Best Regards,
Banafsheh
Member of MDSE Research Group
http://mdse.ui.ac.ir
[Updated on: Tue, 04 June 2019 09:00] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.06115 seconds