BigQuery query from a nested field -


i have table nested field externalids.value

i want run query 2 entries match values in field. here query have, doesn't return data.

select keyfield, field2, example.field1, example.field2, externalids.type, externalids.value (flatten([dataset1.table1], externalids)) externalids.value = '157' , externalids.value = 'some test data' ; 

if run query 1 clause (externalids.value = '157') , run query keyfield = "the value returned previous query", 2 lines. 1 showing externalids.value '157' , result 'some test data'.

i'm not interested in displaying both values in result. priority keyfield .value '157' , 'some test data'

maybe that:

select keyfield, field2, example.field1, example.field2, externalids.type, externalids.value [dataset1.table1] omit record if not(   some(externalids.value = '157') ,   some(externalids.value = 'some test data')) 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -