Book a Demo

Author Topic: language data type conversion  (Read 4169 times)

Jakub

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
language data type conversion
« on: November 20, 2013, 03:22:11 am »
Is there a way how to transform a data type from PSM to PIM e.q. in C# there is a type UInt16 which would reffer to int in PIM.

CONVERT_TYPE does this transformation from PIM to PSM


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: language data type conversion
« Reply #1 on: November 20, 2013, 06:32:43 am »
Just from the stomach my feeling is that transformation was designed for the forward process, not for re-engineering. So the answer is most likely: not possible unless you use some add-in.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: language data type conversion
« Reply #2 on: November 20, 2013, 09:12:26 am »
If you're writing transform templates to do it then it would look something like this.

%if attType="UInt16"%
 type="int"
%elseIf ... %

%endIf%

Jakub

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: language data type conversion
« Reply #3 on: November 20, 2013, 11:19:42 pm »
thanks!

Is it possible to do a contain operation on string?
something like "Dictionary<String, Shift>".contains("Dictionay")

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: language data type conversion
« Reply #4 on: November 21, 2013, 08:22:53 am »
You'll find FIND on the help page for function macros, but you'll need to do it before the condition and assign it to a variable to check later.
« Last Edit: November 21, 2013, 08:23:27 am by simonm »

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: language data type conversion
« Reply #5 on: November 26, 2013, 04:09:22 pm »
Re: Original question - there are some similar scripts available on the Community site for Database PSM->PIM that you might be interested in.
See: http://community.sparxsystems.com/community-resources/512-84data-modeling-logical-and-conceptual-mda-transforms