How can I set a exist column value to a macro

WentingLi13
WentingLi13 New Altair Community Member
edited November 5 in Community Q&A


As below, i have a column "concat(lot_id)", i want to set this column value to a macro which named "input"


Then i can use this macro in SQL like:


But if I do like this, macro input value is always [concat(lot_id)], so what did i do wrong, and how can I set a exist column value to a macro?

Look forward your help, thanks!

Best Answer

  • MartinLiebig
    MartinLiebig
    Altair Employee
    Answer ✓
    Hi,
    I think the operator you want to use is Extract Macro and not Set Macro. Extract Macro allows use values of an example set to define a macro. Set macro just sets constant macros.
    In Extract macro you choose data_value as an option and select your attribute.
    Best,
    Martin

Answers

  • MartinLiebig
    MartinLiebig
    Altair Employee
    Answer ✓
    Hi,
    I think the operator you want to use is Extract Macro and not Set Macro. Extract Macro allows use values of an example set to define a macro. Set macro just sets constant macros.
    In Extract macro you choose data_value as an option and select your attribute.
    Best,
    Martin
  • WentingLi13
    WentingLi13 New Altair Community Member
    @mschmitz
    Thank you so.....much, my issue was solved via using Extract Macro!!!!  :)