Handle NULL in Magic


It would be nice to have a tile, or an option in Alter or Join tiles to mass handle NULL values.
I understand that I can use a formula for every column as follows but after about 3 columns it gets tedious.
case when `col1` is NULL then '' else `col1` end
Comments
-
If the NULL values exist in the input dataset, you can configure that fields settings in the "Input DataSet" tile.
Not as easy as a tile to handle it for all fields at once but it is easier than a formula tile.
3 -
@TheLookout That's awesome! Thank you, this will save me a bunch of time.
1 -
@JasonAltenburg I wanted to add one thing, if you're doing this later in the dataflow you can use the IFNULL() command rather than a case statement.
IFNULL(`col1`,'')
will return the same value as your example case statement. I use that in combination with the NULLIF() command frequently.IFNULL(NULLIF(`col1`,''),`col2`)
If column 1 is blank or null, it will be replaced by column 2. If column 1 is not blank or null, it will remain its current value. A little more concise then writing out a full case statement or coalesce.1 -
Could we also add a feature to this to mass handle NULL OR blank strings (even if one space)
I always end up writing something like:
- case
- when `col1` is NULL or Len(trim(`col1`) <1 then ''
- else `col1`
- end
2 -
I just ran into this problem again, I appreciate your feedback @DuncanDomo that's exactly the sort of tile I'd like to see. Creating another dataflow and chaining them just to handle nulls is a bit problematic and looks bad / hard to teach for end users.
0
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 305 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 107 SQL DataFlows
- 648 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 775 Beast Mode
- 75 App Studio
- 43 Variables
- 734 Automate
- 186 Apps
- 471 APIs & Domo Developer
- 63 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 403 Distribute
- 117 Domo Everywhere
- 277 Scheduled Reports
- 9 Software Integrations
- 137 Manage
- 134 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 113 Community Announcements
- 4.8K Archive