How to delete portion of text in a column in the ETL?
I have a date column that is in this format:
The format of the date is fine, but what I am trying to do is get rid of everything including the 'T' and to the right, so that all that is left would be 2021-06-27. If a solution within the ETL is possible that would be great.
Best Answer
-
@user048760 in Magic ETL, you can use the String Operations tile and choose Right/Left Substring, select your column, enter 10 for the substring length and choose Left for side to start from. This will remove everything from the T and later, leaving just the date.
Next, drag in the the Set Column Type tile and connect it to your String Operations tile. Select your newly created column from the String Operations tile and choose Date for the type. This will convert it to a date data type, which will make it easier to work with in the Analyzer.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0
Answers
-
Hi @user048760
Was this field imported as a timestamp or is it configured as a string? You can utilize the Set Column Type tile in Magic ETL 1.0 or the Alter Columns in Magic ETL 2.0 to force the data type to be a Date.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
it is configured as string. Illustrates the date someone is scheduled to move-out. the minutes/seconds is kind of pointless. Is implemented in the report on the side where this data comes from prior to getting loaded in to Domo.
0 -
In that case if Domo is unable to convert the string directly to a date you may need to convert it to a timestamp first before you then convert it to a date.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@GrantSmith is that also possible within the ETL, or would it have to take place in the system where this data originates?
0 -
Those are actual tiles within the Magic ETL platform. You can use those in your Magic ETL to convert your string to a date.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@user048760 in Magic ETL, you can use the String Operations tile and choose Right/Left Substring, select your column, enter 10 for the substring length and choose Left for side to start from. This will remove everything from the T and later, leaving just the date.
Next, drag in the the Set Column Type tile and connect it to your String Operations tile. Select your newly created column from the String Operations tile and choose Date for the type. This will convert it to a date data type, which will make it easier to work with in the Analyzer.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive