Rename Column or Create New Column

Magic ETL's Join Data does not accept the join column from two different datasets if they have a different column name (even though the format of the data is the same). So I need to either rename a column in one dataset or create a new column that duplicates the data, but has a different name. Thoughts?

Best Answer

  • mdelorey
    mdelorey Domo Employee
    Answer ✓

    @bstephens: I was able to create a Magic ETL dataflow that joins on any compatible column from two different datasets. See the screenshot below which joins on Name column and Id column and outputs the dataset seen below. I believe that is possible. Maybe could you clarify what you're trying to do if this doesn't answer your question?

     

    Dataflow

    screenshot_561.png

     

    Output dataset

    screenshot_562.png

    Retired Domo Alum

Answers

  • I know I can do this in Beast Mode by creating a new variable, but I'd like to do it in Magin ETL before I build the card so I can join it with a different dataset.

  • mdelorey
    mdelorey Domo Employee
    Answer ✓

    @bstephens: I was able to create a Magic ETL dataflow that joins on any compatible column from two different datasets. See the screenshot below which joins on Name column and Id column and outputs the dataset seen below. I believe that is possible. Maybe could you clarify what you're trying to do if this doesn't answer your question?

     

    Dataflow

    screenshot_561.png

     

    Output dataset

    screenshot_562.png

    Retired Domo Alum
  • Strange it didnt work the first time. Maybe I hadnt Run Preview to update my Set Column Type action first. Although I do remember getting a different error (than the "data types must match"), but I cant remember exactly what it said.

     

    Still it would be nice to know how to Create a new column in Magic ETL. What I did that is probably a work-around is Combine Columns with only one column selected. If there is a better way, Id love to know how.

     

    Thanks.

  • mdelorey
    mdelorey Domo Employee

    There isn't a Magic ETL transform action to simply add a new column. The Combine Columns is one of the shortcuts. You can also do an Add Constants step followed by a Set Column Value step depending on what you're trying to achieve.

     

    Adding a column would be a helpful tool. I'm not sure if there is an idea in the Ideas Exchange for it or not, but you can definitely add it.

     

    cc/ @mattchandler

    Retired Domo Alum
  • RabidCougar
    RabidCougar Contributor

    Actually, under Edit Columns there is a transform called Add Constants. This is how you add a new column via Magic ETL. If you leave the Constant Value field blank, it will create the column without populating it.


    ** I work for Domo
  • Lara
    Lara Member

    Hello,

     

    Can I add a column with ETL and then edit the content?

    If I don't want to have a constant value and I want to fill the column with an if condition, can I do it with ETL, or add the column with ETL and then edit its content with beast mode? 

     

    Thanks! 

This discussion has been closed.