I have 2 tables:
To keep problem definition simple, here is the schema for 1st:
student_id int
phones repeated
- phones.number string
- phones.type string
2nd table:
student_id int
courses repeated
- courses.id int
- courses.name string
Both tables have same number of rows and same student ids. All I need is to combine both repeated records into one master student table: (keeping 2 distinct repeating fields) something like:
student_id int
phones repeated
- phones.number string
- phones.type string
courses repeated
- courses.id int
- courses.name string
How can i do this in bigquery ? (I tried a bunch of approaches, but all ended up creating repeating rows for repeated fields. It would be good to get a fresh perspective from bigquery masters on stackoverflow). Thanks in advance.