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 any users posts that helped you.
**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 to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
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
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 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