Q: 4
A data engineer needs to apply custom logic to identify employees with more than 5 years of
experience in array column employees in table stores. The custom logic should create a new column
exp_employees that is an array of all of the employees with more than 5 years of experience for each
row. In order to apply this custom logic at scale, the data engineer wants to use the FILTER higher-
order function.
Which of the following code blocks successfully completes this task?


Options
Discussion
Likely H, ad something like this in a mock, picked A because the lambda checks for strictly > 5 years. That's exactly what the question asks. Pretty sure that's right but if it was 35 or more', then C would fit.
Probably A, code block syntax is super clear and matches what I saw in a similar Databricks practice. Solid question format here.
C/D? If custom logic changes to "at least 5 years" experience, C might be right, but "more than 5" fits A.
Guessing A. The FILTER function with
i.years_exp > 5 aligns perfectly with what the question asks, since "more than 5 years" means strictly greater, not equal to 5. Option C might trip people up since it would include those with exactly 5 years. Pretty sure on this but open to correction if someone sees a catch.Why not C? The question says "more than 5 years," so "> 5" in A fits, while C would include 5-year employees, right?
Its A since the FILTER function with i.years_exp > 5 matches "more than 5 years" in the array column, just like Databricks docs say. I think practice exams use similar syntax too. Correct me if I'm missing something.
A tbh
A is right
Logic in A checks for strictly more than 5 years, which fits what the question asks. The FILTER function with i.years_exp > 5 is the right way in Databricks. Pretty sure A is solid here, but happy to hear other takes.
C is wrong, it's definitely A for strictly more than 5 years. The lambda in A matches the requirement exactly.
Be respectful. No spam.