简体   繁体   中英

How to get a column inside another column?

I'm trying to run the column

name.pt_BR

that's inside the column

name

but I didn't understand how to get this in BigQuery.

How to get this info to join in another query later?

SELECT name.pt_BR FROM `source_internal.skills` 

Returns the error

Cannot access field pt_BR on a value with type ARRAY<STRUCT<pt_BR STRING, en STRING>> at [1:13]

The column:

name

name. pt_BR

name. en

Try below.

SELECT pt_BR 
FROM `source_internal.skills`, UNNEST(name)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM