Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Attribute named 'function' in ETL
Attribute named 'function' in ETL [message #537211] Tue, 01 June 2010 15:09 Go to next message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Hi,
If a metamodel class has an attribute named 'function' then it appears
to cause problems within an ETL rule:

(1)rule MyRule
(2) transform inItem : Source!InputModelElement
(3) to outItem : Target!OutputModelElement {
(4) outItem.name := inItem.function;
(5) outItem.number := inItem.number.asInteger();
(6)}

Line 4 won't parse as it stands, 'function' appears to be a reserved
word in ETL (EOL?). Can I escape the attribute name in some way?

Regards
Chris
Re: Attribute named 'function' in ETL [message #537212 is a reply to message #537211] Tue, 01 June 2010 15:12 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

You can use backticks to escape reserved words. E.g.

outItem.name := inItem.`function`;

Cheers,
Dimitris

Chris Holmes wrote:
> Hi,
> If a metamodel class has an attribute named 'function' then it appears
> to cause problems within an ETL rule:
>
> (1)rule MyRule
> (2) transform inItem : Source!InputModelElement
> (3) to outItem : Target!OutputModelElement {
> (4) outItem.name := inItem.function;
> (5) outItem.number := inItem.number.asInteger();
> (6)}
>
> Line 4 won't parse as it stands, 'function' appears to be a reserved
> word in ETL (EOL?). Can I escape the attribute name in some way?
>
> Regards
> Chris
Re: Attribute named 'function' in ETL [message #537213 is a reply to message #537212] Tue, 01 June 2010 15:23 Go to previous message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Thanks Dimitris:)

Best Wishes
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> You can use backticks to escape reserved words. E.g.
>
> outItem.name := inItem.`function`;
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi,
>> If a metamodel class has an attribute named 'function' then it appears
>> to cause problems within an ETL rule:
>>
>> (1)rule MyRule
>> (2) transform inItem : Source!InputModelElement
>> (3) to outItem : Target!OutputModelElement {
>> (4) outItem.name := inItem.function;
>> (5) outItem.number := inItem.number.asInteger();
>> (6)}
>>
>> Line 4 won't parse as it stands, 'function' appears to be a reserved
>> word in ETL (EOL?). Can I escape the attribute name in some way?
>>
>> Regards
>> Chris
Re: Attribute named 'function' in ETL [message #589624 is a reply to message #537211] Tue, 01 June 2010 15:12 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Chris,

You can use backticks to escape reserved words. E.g.

outItem.name := inItem.`function`;

Cheers,
Dimitris

Chris Holmes wrote:
> Hi,
> If a metamodel class has an attribute named 'function' then it appears
> to cause problems within an ETL rule:
>
> (1)rule MyRule
> (2) transform inItem : Source!InputModelElement
> (3) to outItem : Target!OutputModelElement {
> (4) outItem.name := inItem.function;
> (5) outItem.number := inItem.number.asInteger();
> (6)}
>
> Line 4 won't parse as it stands, 'function' appears to be a reserved
> word in ETL (EOL?). Can I escape the attribute name in some way?
>
> Regards
> Chris
Re: Attribute named 'function' in ETL [message #589637 is a reply to message #537212] Tue, 01 June 2010 15:23 Go to previous message
Eclipse UserFriend
Originally posted by: c.k.holmes.lboro.ac.uk

Thanks Dimitris:)

Best Wishes
Chris

Dimitris Kolovos wrote:
> Hi Chris,
>
> You can use backticks to escape reserved words. E.g.
>
> outItem.name := inItem.`function`;
>
> Cheers,
> Dimitris
>
> Chris Holmes wrote:
>> Hi,
>> If a metamodel class has an attribute named 'function' then it appears
>> to cause problems within an ETL rule:
>>
>> (1)rule MyRule
>> (2) transform inItem : Source!InputModelElement
>> (3) to outItem : Target!OutputModelElement {
>> (4) outItem.name := inItem.function;
>> (5) outItem.number := inItem.number.asInteger();
>> (6)}
>>
>> Line 4 won't parse as it stands, 'function' appears to be a reserved
>> word in ETL (EOL?). Can I escape the attribute name in some way?
>>
>> Regards
>> Chris
Previous Topic:Attribute named 'function' in ETL
Next Topic:'static' variables for EVL invariants
Goto Forum:
  


Current Time: Fri Apr 26 19:33:06 GMT 2024

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

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

Back to the top