Magic ETL or Beast Mode?

damen Contributor
edited October 2022 in Magic ETL

Hey everyone,

I'm using data that basically needs an (=if) statement like we were going to be using excel--

We have two columns called current income and qualified income. The 'income' column needs to populate with 'current income' if another column, called 'instrument' reads 'first home' otherwise, we need to use qualified income to populate the new column called 'income'.

Is the best way to do this using a beast mode? or what tile would i use in magic ETL? im lost as to how i would do either of them as well. Any and all info would be greatly appreciated.

If this helps, feel free to agree, accept or awesome it!


  • Jones01
    Jones01 Contributor

    @damen I would use a beast mode with something like

    case when instrument = 'first home' then `current income` else `qualified income` end

  • RobSomers

    @damen I would recommend using a beast mode and sharing it on the dataset. That way if you need to tweak it, you can do it in the analyzer and get the update right away without having to edit the ETL and run it.

    **Was this post helpful? Click Agree or Like below**

    **Did this solve your problem? Accept it as a solution!**

  • GrantSmith

    There are perks for having something as a beast mode and perks for having something in an ETL.

    If something needs to be recalculated on the fly utilizing a filter then I'll go with a beast mode.

    Most of the time I'll try and put calculations into the Magic ETL so that the processing may take a fraction longer to prepare the data but won't give a negative UI experience if there are too many beast modes saved to a dataset. Whenever a card is rendered all beast modes are evaluated whether or not the beast mode is actually used on the card. This can cause delays when rendering a page giving a poorer user experience.

    In your case it doesn't sound like you'd need to have filters applied so I'd recommend putting it into the ETL you're using to prepare the data. You can use a formula tile to do many similar operations as a beast mode (except window / fixed functions).

    You can use @Jones01 's formula to conditionally set the value based on your logic.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**