Creation of a new variable based on delimiter

Hi, In my Data I have a column name 'Origin_Data' which holds data like 'aa/df', 'bb/saw', 'asd/erw' etc. (character type)

 

Now I want to create a new column say name 'Final_Data' who values will be just the left part of the values of 'Origin_Data' after splitting with '/' - delimiter i.e. 'aa', 'bb', 'asd' etc

 

Any pointer how to achieve this in Domo will be highly helpful.

 

Thanks,

Best Answer

  • guitarhero23
    Accepted Answer

    Yes sorry by ETL dataset I mean the new dataset that you chose to create at the end of the ETL process (Input block-->ETL transforms-->Output block) where the output block is where you created a new dataset. This is what I'm referring to as the ETL dataset.

     

    In the ETL settings just choose the option which will automatically run the ETL everytime your original (input) dataset gets updated. That way you don't have to worry about it. Alternatively you can set it to run on a schedule but having it run whenever the input dataset gets updated is my go to option to make sure things are in sync.

    Dojo help 2.JPG

Answers

  • You might be able to utilize the ETL tools for this. Refer to this post regarding using REGEX to create a new column based on that existing column.

     

    https://dojo.domo.com/t5/Beast-Mode-ETL-Dataflow/Magic-ETL-Value-Mapper-Wildcard/td-p/12059

  • If you are comfortable with REGEX, I'm sure you could accomplish this that way.  However, you can also use the "Split Column" tile.

     

    1.png

  • Hi, Where can I get that 'Split Column' option?

  • It is a tile in a ETL dataflow.  If you aren't an Editor or higher, I don't think you will have access to the ETL dataflow option.  

     

    If you are, and you need help creating one, let me know and I can provide some more screenshots.

  • Thanks for this.

     

    How can I check if I am an Editor or higher?

     

    Assuming not, can you please provide screenshots creating that -that will be really helpful. Thanks,

  • Do you have the ability to click "+", "Data", then "ETL" in the upper right? If so it would mean you're an editor or higher.

     

    Dojo Help.JPG

  • Thanks for this snapshot. Yes I have that access. Appreciate if you please tell me the next step

  • ETL Split.JPG

     

     

    Try the following:

    • Input dataset is the dataset this is stored in
    • Add the "Split Column" ETL block and draw a line from the input dataset to it
    • #1: Choose the column that has the values you mentioned that you desire to split
    • #2: Choose the delimiter that's being split, for you choose custom and put that slash
    • #3: Ignore...I believe
    • #4: Create two new columns to store the split values on. So if the column from #1 was "ab/cd" you could create two new columns, one would show "ab" the other "cd"
    • Add the Output dataset block and choose a name. This will be the dataset that contains the new columns you're creating.
    • If applicable this dataflow to run whenever the original dataset is updated.
  • Thanks for this.

     

    So now I have 2 datasets i.e. Original Dataset + New Data set (this new dataset has 2 columns).

     

    How can I combine these 2 datasets to get a consolidated dataset which holds my original columns as well as 2 new columns with split values?

  • The common case is that you wouldn't combine them. In this case since your ETL dataset contains all of the same information + two additional columns you would just use this dataset for all of the cards, the other dataset would exist but only for the purpose of getting the untouched data into Domo, then the ETL would automatically run.

     

    I can see how if you have a data limit this may be of concern to you, maybe someone else or your account manager has a recommendation?

  • Thanks for the clarification. Few more questions.

     

    What do you mean by 'ETL dataset'? Is this the new dataset that I have created? If yes, then I presume based on your answer that this so called 'ETL dataset' will hold all columns from my previous Dataset + 2 additional columns after the split. Please correct me if I am wrong.

     

    How this new dataset will get updated? Let say I add few more raws in my old dataset, then this new dataset will automatically be updated?