adspace


Explain count_star?

Answer Posted / Hari Keshwar Prasad

"count_star" in Apache Pig is a UDF (User Defined Function) used to calculate the number of non-null values or star-level cardinality of a schema. It's particularly useful for counting the number of rows or tuples in a relation when the schema isn't known beforehand.nnExample usage:n`DEFINE count_star UDF(); data = FOREACH input_data GENERATE count_star();`

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of UNION and SPLIT operators? Give examples?

620