Filter out junk data
There is a dataset I import using Workbench, then transform using Magic ETL. The data includes values between 1-10, but sometimes will contain a random junk value like 324568. I'd like to filter out all values that don't fall between 1-10, but can't find a way to do this wihtout specifying every possible junk value, ie. replace 11 with Null, replace 12 with Null...this will take quite some time to reach 324568
Best Answer
-
You can try the following (using something like the IF value under Category:Logical)
2
Answers
-
You could do a select from your data and use the following Case statement to replace all values > 10 with NULL.
SELECT CASE WHEN `numbercolumn` > 0 AND `numbercolumn` <= 10 THEN `numbercolumn` END AS 'Cleaned Number'
FROM datasetWhen using a case statement, anything that is not specified to be captured by a the WHEN clause will be replaced with a NULL.
Let me know if you have any questions on this.
Sincerely,
Valiant2 -
Thanks! Would this Case statement be used in a Beastmode, or can this be done on the data level?
0 -
Either would work. Use it in a SELECT statement to take care of it at the data level, or just the CASE statement itself as a beastmode.
1 -
Is the SELECT statement used in a Workbench Transform, in an ETL, or somewhere else?
Thanks again
0 -
It can be done in Workbench or within a MySQL transform.
The easiest method is probably just to create a beastmode and then check to the box to 'Save to dataset' so you can reuse it as needed.
0 -
I originally thought about using Beast mode, but I already have dozens of cards built and would rather fix the data than edit all of the cards to use new fields. I can't for the life of me find how to use a Select statement in Workbench, do you know if there is a guide for this? Can it be done with a Filter Transform or Search/Replace Transform?
Thanks again
0 -
You can try the following (using something like the IF value under Category:Logical)
2 -
This looks like it will work, thanks!
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
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 747 Beast Mode
- 59 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 396 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 126 Manage
- 123 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 109 Community Announcements
- 4.8K Archive