Attribute named 'function' in ETL [message #537211] |
Tue, 01 June 2010 15:09 |
Eclipse User |
|
|
|
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 #537213 is a reply to message #537212] |
Tue, 01 June 2010 15:23 |
Eclipse User |
|
|
|
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 #589637 is a reply to message #537212] |
Tue, 01 June 2010 15:23 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03969 seconds