How do i filter rows in bigquery, where a nested repeated field contains certain value? -
lets assume nested repeated field experience.company, experience.months. if experience record contains , say, "ge" in experience.company, want skip entire record.
the query tried of sort:
select name, location table_name experience.company != "ge".
this doesn't work, since record other values.
i tried omit if, same result.
anything else try?
below bigquery standard sql
#standardsql `table_name` ( select 1 id, 'john' name, 'la' location, [struct<company string, months int64>('google', 24), ('apple', 36)] experience union select 2, 'nick', 'sf', [struct<company string, months int64>('ge', 12), ('microsoft', 48)] experience union select 3, 'mike', 'lv', [struct<company string, months int64>('facebook', 24), ('cloudera', 36)] experience ) select name, location `table_name` not exists (select 1 unnest(experience) company = 'ge')
Comments
Post a Comment