Test if field contains only white space
Jasper Super Learner
I am still new to ADS. I have fields that contain just white spaces (1-3 spaces in a row [" "]). The ISNULL test does not FAIL these as it is not technically NULL. Is there a test for this? Note I cannot exclude every field with a space " " as many are valid spaces between two words.
Li He Experian Employee
The Function 'Is Empty' might be what you are looking for. It checks whether the value is empty. An empty value can be any of the following:
- empty list
- zero-length string
- unprintable character
Hey! You will be signed out in 60 seconds due to inactivity. Click here to continue using the site.
NNote, I realise I can do this using 'equals' on known empty strings (e.g. equals ' , ' ',' '). However I would like something that can identify no matter how many empty spaces there are without hardcoding.
The Function 'Compact spaces' Reduces multiple spaces in input value to single space, so no matter how many spaces they will always be a single space. Equals single space character will then cover any number of repeated spaces in future
Thanks Josh. I also realised there is a built in 'Is Empty' function that can be accessed through the Transform step. I tested it and it seems to get the same result (all white space or NULL fields).