Replacing single quote/apostrophe with nothing


I am trying to replace a single quote with nothing using the formula tile in Magic ETL, but it is giving me a syntax error. According to MySQL, you should be able to use a backslash as an escape character so that it will process correctly, but Domo is giving me an error. Any ideas?
**Make sure to

**Please mark as accepted the ones who solved your issue.
Best Answers
-
ETL Formula tile doesn't seem to want to handle single quotes correctly. I've been able to get it to remove single quotes using the Replace Text tile but you may have to put in the single quote a couple times as I've had it remove the single quote and replace my single quote with empty string.
You can copy the JSON code below and paste it into your ETL which should remove the single quotes. You'll just need to update the field names.
{"contentType":"domo/dataflow-actions","data":[{"name":"Replace Text","id":"5a02f438-db47-4f1d-ac57-484a94fcf775","type":"ReplaceString","gui":{"x":156,"y":180},"dependsOn":["0c670718-8546-4cc5-a42b-51e326b70b6c"],"removeByDefault":false,"notes":[],"fields":[{"inStreamName":"Promotion","useRegex":false,"replaceString":"'","replaceByString":"","wholeWord":false,"caseSensitive":false}]}]}
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Hi Mark,
SQL uses two single quotes to represent one in a string. so try using
REPLACE(`Longitude`,'''','')
This should definitely work
1
Answers
-
ETL Formula tile doesn't seem to want to handle single quotes correctly. I've been able to get it to remove single quotes using the Replace Text tile but you may have to put in the single quote a couple times as I've had it remove the single quote and replace my single quote with empty string.
You can copy the JSON code below and paste it into your ETL which should remove the single quotes. You'll just need to update the field names.
{"contentType":"domo/dataflow-actions","data":[{"name":"Replace Text","id":"5a02f438-db47-4f1d-ac57-484a94fcf775","type":"ReplaceString","gui":{"x":156,"y":180},"dependsOn":["0c670718-8546-4cc5-a42b-51e326b70b6c"],"removeByDefault":false,"notes":[],"fields":[{"inStreamName":"Promotion","useRegex":false,"replaceString":"'","replaceByString":"","wholeWord":false,"caseSensitive":false}]}]}
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Hi Mark,
SQL uses two single quotes to represent one in a string. so try using
REPLACE(`Longitude`,'''','')
This should definitely work
1 -
@tejusarora Thanks! I tried that earlier and it was giving me an error, but now it is working as well.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 307 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 112 SQL DataFlows
- 649 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 790 Beast Mode
- 78 App Studio
- 43 Variables
- 746 Automate
- 187 Apps
- 475 APIs & Domo Developer
- 68 Workflows
- 16 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 406 Distribute
- 117 Domo Everywhere
- 279 Scheduled Reports
- 10 Software Integrations
- 139 Manage
- 136 Governance & Security
- 8 Domo Community Gallery
- 47 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 113 Community Announcements
- 4.8K Archive