When i query two level nested field i miss some rows.
The schema is like this:
Productid STRING REQUIRED
Variants RECORD REPEATED
Variants.SKU STRING NULLABLE
Variants.Size STRING NULLABLE
Variants.Prices RECORD REPEATED
Variants.Prices.Country STRING NULLABLE
Variants.Prices.Currency STRING NULLABLE
Some of Variants.Prices records are empty.
When i query this table with this query:
select Productid,Variants.SKU,Variants.Size
from ga-export-0000.feed.feed_dev
,UNNEST (Variants) AS Variants
i get many more rows than with this one:
select Productid,Variants.SKU,Variants.Size
,Prices.Currency,Prices.Country
from ga-export-0000.feed.feed_dev
,UNNEST (Variants) AS Variants
,UNNEST(Variants.Prices) as Prices
That's because it doesn't returns rows with missing Variants.Prices.
How can i modify my second query so it returns all the rows and if Variants.Prices is missing it shows NULL?