Book a Demo

Author Topic: Reading Precision in a branching macro  (Read 2754 times)

dkoger

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Reading Precision in a branching macro
« on: February 01, 2019, 11:03:16 pm »
We have a set of custom macros that process our modeling stack.  We can reverse engineer, create logical and then conceptual models modify the models as needed and then push the changes back down the stack.  This is great except at the physical to logical level.  When we have a numeric I need to make a datatype choice based on precision in order to apply our custom datatypes for our Azure models.

Code snippet:
%elseIf attType=="numeric" and attTag:"precision"=="18"%
 type="Metric"
%elseIf attType=="bigint"%
 type="PrimaryKey"
%elseIf attType=="nvarchar" and attLength="25"%
 type="RowSource"
%elseIf attType=="nvarchar" and attLength="50"%
 type="AK%sl%BK"
%elseIf attType=="numeric"and attTag:"precision"=="24"%
 type="Exchange Rate"
%endIf%


I assume I am not using the right method for calling out precision.  If I remove the numerics, it processes correctly.  If I leave them in it does not process anything.

dkoger

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Reading Precision in a branching macro
« Reply #1 on: February 05, 2019, 01:49:47 am »
Fixed - needed to use attLength for the precision