Can Magic ETL calculate a sum over an entire column?

Dr_Duru
Dr_Duru Member
edited March 2023 in Magic ETL

I hope I am missing something here.

I want to simply run the equivalent of SELECT SUM(columnA) from TableB in Magic ETL. However, it seems the only way to do this sum is: 1) add a columnC to TableB where every row in columnC is the same value, and 2) do a Group By aggregating on columnC.

Is there a better way in Magic ETL?

Best Answer

  • MarkSnodgrass
    Answer ✓

    Magic ETL does need a column to be selected. The easiest way to do this is to use the Add Constant tile and create a column with a constant value or do the same with the add formula tile. Then, just add this column to your group by and sum on the field you need to sum up. You can remove afterwards with the select columns tile.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.

Answers

  • MarkSnodgrass
    Answer ✓

    Magic ETL does need a column to be selected. The easiest way to do this is to use the Add Constant tile and create a column with a constant value or do the same with the add formula tile. Then, just add this column to your group by and sum on the field you need to sum up. You can remove afterwards with the select columns tile.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Thanks for confirming, @MarkSnodgrass