sshevlyagin
sshevlyagin

Reputation: 1397

Error Query failed: Cannot unnest type: row

I'm running a query with a

select bar_tbl.thing1
from foo
cross join unnest(bar) as t(bar_tbl)

And got the error Error Query failed: Cannot unnest type: row

Why?

The bar column looks like this {thing1=abc, thing2=def}

Upvotes: 12

Views: 8839

Answers (1)

sshevlyagin
sshevlyagin

Reputation: 1397

Turns out I was trying to expand a row, which doesn't make sense. I should have just done

select bar.thing1
from foo

Upvotes: 15

Related Questions