Dynamic Pivot Columns | How to generate dynamic Pivot Columns in BigQuery

  Рет қаралды 9,644

Datasudh

Datasudh

Күн бұрын

Пікірлер: 15
@shivarajmiraje6672
@shivarajmiraje6672 2 ай бұрын
Really helpful 🎉
@agustinnosiglia5848
@agustinnosiglia5848 2 жыл бұрын
Exactly what I was looking for with an easy-to-understand example! Thanks!
Жыл бұрын
Awesome! Congrats for the videos! Keep posting to the BigQuery series please!!! Cheers
@yuejian8089
@yuejian8089 2 жыл бұрын
Thank you!!!! It reallly helps a lot.
@TechnologiesExtendo
@TechnologiesExtendo Жыл бұрын
Thank you much for the tutorial! Just what I need it. Now, how can you create an new table from the results in a way you can do it scheduled? I believe that would be using STORE PROCEDUREs with this scripting, but I don't know what would be the syntax to store the results into a final TABLE that can be reconstructed every time I run the PROCEDURE. I tried using SCHEDULED QUERIES but the scripting is not allowed there. Any help would be much appreciated.
@ClaudioAlbertoCamposHanRedSalu
@ClaudioAlbertoCamposHanRedSalu Жыл бұрын
Great Video!
@hasanasim3980
@hasanasim3980 2 жыл бұрын
Thank you for the wonderful explanation. Is there a similar way by which we can dynamically aggregate string columns in bigquery sql? Usually we would just use Select STRING_AGG(col_1), col_2 From table1 Group BY col_2. What if the number of columns are increasing dynamically?
@datasudh
@datasudh 2 жыл бұрын
Hi Hasan, if you have a scenario where in you want to keep creating aggregate values for dynamic columns which can exist at any point of time then basically you need a query which adds that column formula at run time. You can achieve that by using combination of metadata table which will tell about new column and then add the same to dynamic SQL with string agg function. Do you have a use case where in your columns are increasing dynamically ?
@hasanasim3980
@hasanasim3980 2 жыл бұрын
@@datasudh I have a ‘contacts’ table in which new columns (containing information about the contacts like their age etc.) are being added everyday. These columns have either nulls or string values. I want to string aggregate all these columns and group by contact id so that I get one unique row per contact ID.
@hasanasim3980
@hasanasim3980 2 жыл бұрын
@@datasudh thanks for your reply. I have been trying to use INFORMATION_SCHEMA.COLUMNS with dynamic sql to solve this problem but have been unsuccessful so far.
@datasudh
@datasudh 2 жыл бұрын
@@hasanasim3980 ok, I will give this a try this week and share results with a blog
@ClaudioDeLucke
@ClaudioDeLucke Жыл бұрын
How could i connect this to sheets?
@alelust7170
@alelust7170 2 жыл бұрын
Tks a lot!
@lxvi4322
@lxvi4322 Жыл бұрын
Thansk, can I use this with a CTE?
Pivot Tables in BigQuery SQL🤓
8:30
Mr. Rohbot
Рет қаралды 4,3 М.
15: PIVOT | SQL Tutorial
6:29
learndataa
Рет қаралды 2,4 М.
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 6 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 12 МЛН
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 7 МЛН
Thank you Santa
00:13
Nadir Show
Рет қаралды 53 МЛН
SQL Query | How to dynamically convert rows into columns | Dynamic Pivot
16:18
How to Pivot Your Data in T-SQL for SQL Server - Static and Dynamic Column Examples
13:00
Sean MacKenzie Data Engineering
Рет қаралды 3,3 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 98 МЛН
How does BigQuery store data?
8:20
Google Cloud Tech
Рет қаралды 51 М.
Dynamically Pivot Data in SQL Server
13:50
Anthony Smoak
Рет қаралды 84 М.
SQL Tutorial - PIVOT
13:11
BeardedDev
Рет қаралды 131 М.
Pivot Operator BigQuery
8:52
Code Sadhana
Рет қаралды 1,1 М.
Unnesting RECORD arrays in BigQuery SQL
6:06
Cacheworthy
Рет қаралды 47 М.
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 6 МЛН