Making a bucket list of defects

I am trying to make a bucket for sentence long defects and put them in a column that is easier to filter by and group the defects into a certain defect code. I was able to get this working on a beastmode perfectly but when I try to add this in my ETL it gives me the code Failed to turn value string into Boolean.
Here is the SQL I have written...
CASE
WHEN `ComplaintDesc` LIKE '%COOL%' THEN 'COOLING'
WHEN `ComplaintDesc` LIKE '%ICE%' OR '% ICE%' THEN 'ICE'
WHEN `ComplaintDesc` LIKE '%GAS LINE%' OR '%GAS%' THEN 'GAS LINE'
WHEN `ComplaintDesc` LIKE '%RECALL%' THEN 'RECALL'
WHEN `ComplaintDesc` LIKE '%LEAK%' THEN 'LEAK'
WHEN `ComplaintDesc` LIKE '%HEAT%' THEN 'HEAT'
WHEN `ComplaintDesc` LIKE '%NOISE%' OR '%NOISY%' THEN 'NOISE'
WHEN `ComplaintDesc` LIKE '%DOOR%' THEN 'DOOR'
WHEN `ComplaintDesc` LIKE '%KIT%' THEN 'KIT'
WHEN `ComplaintDesc` LIKE '%DRAIN%' THEN 'DRAIN'
WHEN `ComplaintDesc` LIKE '%MISSING%' THEN 'MISSING'
WHEN `ComplaintDesc` LIKE '%PART%' THEN 'PARTS'
WHEN `ComplaintDesc` LIKE '%IGNIT%' OR '%IGNITE%' OR '%LIGHTING%' THEN 'IGNITION'
WHEN `ComplaintDesc` LIKE '%UNREPAIRABLE%' THEN 'UNREPAIRABLE'
WHEN `ComplaintDesc` LIKE '%LETTERS%' THEN 'LETTERS'
WHEN `ComplaintDesc` LIKE '%BURNER%' THEN 'BURNER'
WHEN `ComplaintDesc` LIKE '%FREEZE%' THEN 'FREEZE'
WHEN `ComplaintDesc` LIKE '%NOT WORK%' OR '%NOT TURNING%' OR '%NOT START%' THEN 'NOT WORKING'
WHEN `ComplaintDesc` LIKE '%ERROR%' THEN 'ERROR'
ELSE 'OTHER'
END
Let me know your thoughts.
Thanks
Answers
-
Hi @gbrown ,
What if you don't do any OR statements or AND statements? For instance, you'd do this:
WHEN `ComplaintDesc` LIKE '%ICE%' THEN 'ICE'
WHEN `ComplaintDesc` LIKE '% ICE%' THEN 'ICE'
Curious to know if that works
John Le
More video solutions at https://www.dashboarddudes.com/pantry
John Le
Are you on my newsletter? If not, signup here so you don't miss out on my Domo tricks, alerts about my webinars, cooking tips and more
Signup here:
1 -
For the OR statement, you need to restate the field you are comparing against like this:
WHEN `ComplaintDesc` LIKE '%ICE%' OR `ComplaintDesc` LIKE '% ICE%' THEN 'ICE'
**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
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 657 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 815 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 81 App Studio
- 45 Variables
- 775 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 81 Workflows
- 23 Code Engine
- 40 AI and Machine Learning
- 20 AI Chat
- 1 AI Playground
- 1 AI Projects and Models
- 18 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 144 Manage
- 140 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive