BigQuery Working with Array Structures

On a companies table where you can have multiple websites per company:

SELECT * 
	FROM 
    	project_namespace.dataset.companies as companies, 
    	UNNEST (companies.websites) as website 
    LIMIT 1000

The above would produce a flattened table structure where company id is repeated per website.


Revision #1
Created 3 January 2023 10:42:10 by James
Updated 21 January 2024 14:51:44 by James