Тёмный

Unnesting RECORD arrays in BigQuery SQL 

Cacheworthy
Подписаться 10 тыс.
Просмотров 46 тыс.
50% 1

Using the CROSS JOIN UNNEST() function to flatten arrays into single rows in BigQuery, using the Google Analytics sample BigQuery dataset.
Learn more and grab the SQL cheat sheet at codingisforlosers.com/learn-b....

Хобби

Опубликовано:

 

20 май 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@iamfavoured9142
@iamfavoured9142 Год назад
Thank you for This series God bless you
@gerritrindermann632
@gerritrindermann632 4 года назад
I think conceptually you misunderstood something. It's not that you can't reference 3 levels deep. It's about unnesting is for arrays. What you did @4:54 with referencing into the second level is because that's actually a struct. You can see that in the schema. REPEATED means Array, RECORD means struct. In general what happens though that you have an array of structs. I think that's why you came up with the idea that the 3rd level needs to be unnested. I'm just leaning big query as well. So correct me if I'm wrong :)
@cacheworthy
@cacheworthy 4 года назад
You may be right! I just do what gets the job done :)
@datacleaningchallenge2029
@datacleaningchallenge2029 2 года назад
Can iHave your email? wanna ask a question if you don't mind
@ayisha924
@ayisha924 4 года назад
Awesome video! Thanks for the good work!
@cacheworthy
@cacheworthy 4 года назад
Glad you liked it!
@judetoussaint3900
@judetoussaint3900 3 года назад
I have a question. Why didn't you unnest Totals. It's also a record. Why unnest only hits. What's the difference?
@arzoo7380
@arzoo7380 4 года назад
Hey can you write unnest query that will flatten nested array or array inside array as well.
@andrewknight1751
@andrewknight1751 Год назад
I want to hug you. Thank you.
@jurges8544
@jurges8544 4 года назад
Hello Thank you for the course, i wanted to unnest traffic but the error message said it need to be a string. I wanted to know the difference between hits and traffic is because hits is repeated not nullable?
@cacheworthy
@cacheworthy 4 года назад
Hey Jurge, sorry I'm not 100% sure what you're referring to there, could you ask that another way?
@thiagogramulha
@thiagogramulha 4 года назад
What's the difference between CROSS JOIN and ","? It'll get different results? Or it is just another way to do the same thing?
@cacheworthy
@cacheworthy 4 года назад
Hmm not sure I follow Thiago, can you drop an example here?
@rahulkhare3040
@rahulkhare3040 4 года назад
how to handle this error. new to bigquery. please help. error : Column name name is ambiguous at [2:1]
@nacerbrik1858
@nacerbrik1858 3 года назад
add alias
@andreasbeschorner1215
@andreasbeschorner1215 Год назад
No need to perform a join on nested data, you can just select from unnest.
Далее
Aggregate by day, week and month in BigQuery
9:15
Просмотров 34 тыс.
BigQuery Arrays (Repeated Fields)
19:07
Просмотров 12 тыс.
Joining tables in BigQuery SQL
10:43
Просмотров 45 тыс.
WITH statements in BigQuery SQL
6:06
Просмотров 23 тыс.
Deduping query results in BigQuery
5:17
Просмотров 10 тыс.
Using analytic (window) functions in BigQuery
7:35
Просмотров 22 тыс.
Strategies for optimizing your BigQuery queries
7:10
Analyzing Big Data in less time with Google BigQuery
29:14
Modern Data Warehousing with BigQuery (Cloud Next '19)
44:34
Эффектная подача Наполеона
0:58
🍁 Ты остался незамеченным
0:26
Nika loves to eat chicken #cat #cats
0:17
Просмотров 39 млн