SPLK-1002 · Question #284
Given the following eval statement: ... | eval field1 = if(isnotnull(field1),field1,0), field2 = if(isnull(field2), "NO-VALUE", field2) Which of the following is the equivalent using fillnull?
The correct answer is D. ... | fillnull value=0 field1 | fillnull field2. The fillnull command can be used to replace null values in specific fields. The correct equivalent expression for the given eval statement would involve using fillnull twice, once for field1 to replace null values with 0, and once for field2 to replace null values with…
Question
Given the following eval statement:
... | eval field1 = if(isnotnull(field1),field1,0), field2 = if(isnull(field2), "NO-VALUE", field2) Which of the following is the equivalent using fillnull?
Options
- A... | fillnull values=(0,"NO-VALUE") fields=(field1,field2)
- BThere is no equivalent expression using fillnull
- C... | fillnull field1 | fillnull value="NO-VALUE" field2
- D... | fillnull value=0 field1 | fillnull field2
How the community answered
(21 responses)- A5% (1)
- B5% (1)
- C19% (4)
- D71% (15)
Explanation
The fillnull command can be used to replace null values in specific fields. The correct equivalent expression for the given eval statement would involve using fillnull twice, once for field1 to replace null values with 0, and once for field2 to replace null values with "NO-VALUE".
Topics
Community Discussion
No community discussion yet for this question.