How to get count of non-leaf fields in dremel

92 views
Skip to first unread message

Gargi Sur

unread,
Mar 11, 2011, 2:15:55 PM3/11/11
to dremel
I am trying to query for a count of nested fields within
QueryEventMessage in GfpAdQueries log. The nested field itself is a
proto message. Is there a way to do this in dremel?

message QueryEventMessage {
...

repeated ImpressionMessage impression_set;
}

I tried following queries but i get error

dremel> select count(impression_set) from ads.GfpAdQueries.yesterday;
(Error) Attempt to read non-leaf field impression_set

dremel> select count(impression_set.delivery_period_id) within record
as cnt from ads.GfpAdQueries.yesterday;
(Error) Result set is too large

Constantine Peresypkin

unread,
Mar 13, 2011, 9:20:11 AM3/13/11
to dremel
1. We are not affiliated with Google BigQuery service in any way.

2. Using aggregate on non-leaf query makes no sense for dremel engine,
therefore you get the error.

3. The "Result set too large" is also simple: there are too much
distinct records to count aggregates for, change your query to be more
selective.
Reply all
Reply to author
Forward
0 new messages