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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive