Workbench transform for NULL from SQL data
Comments
-
0
-
Hi @gaurav007,
There are a couple options to detect/replace NULL values in your data.
- You can perform the operation in Workbench before the data gets loaded to Domo. In the ODBC query window you can use the SQL function native to your source system. i.e for. MSSQL use "ISNULL(your_column,0)", for PL/SQL use "NVL(your_column,0)", for MySQL use "IFNULL(your_column,0)", etc... If your SQL platform is not one of these three then please let me know which platform you are using and I will provide the correct function.
- If the data has already been loaded to your Domo data center then you can use a MySQL dataflow transform to replace NULL with 0. Again, that MySQL function is "IFNULL(your_column,0)"
Please let me know if that does not answer your question.
Thank you,
Creed
**Say "Thanks" by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
@gaurav007, did creed's reply help you out?
0 -
creed's answer is great. If you can do this in the SQL statement that will be the best and fastest way to get this done. I wanted to offer one other option just for the sake of completeness. In workbench (the current version of Wb4) you can do this with a calculated field or a search and replace transform.
A calculated field adds a new column based off the original, and you can use a formula like: IF(ISNULL(Column),0,Column)
For the search and replace, you can search for \x00 (which is a special regular expression workbench uses to represent the null value), and replace with 0.
2 -
This is really helpful - thank you!
0 -
Hi @jeremyhurren,
For the search and replace function, do you know how find blank string and replace them with nulls?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
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 754 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 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