Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
As mentioned in the subject I need to group a string field's data by whether its empty or not empty. How can I do this with SAQL? Do I need to create a boolean variable? and group by that?
Managed to figure it out
q = load "mydataset";
q = foreach q generate (case when 'MyField' is null then "no_case" else "got_case" end) as 'Status', count() as 'C';
q = group q by ('Status');
q = foreach q generate Status as 'Status', sum('C') as 'total';
q = limit q 2000;
Required, but never shown