Let's say, I have music video play stats table mydataset.stats for a given day (3B rows, 1M users, 6K artists). Simplified schema is: UserGUID String, ArtistGUID String
I need pivot/transpose artists from rows to columns, so schema will be: UserGUID String, Artist1 Int, Artist2 Int, … Artist8000 Int With Artist plays count by respective user
There was an approach suggested in How to transpose rows to columns with large amount of the data in BigQuery/SQL? and How to create dummy variable columns for thousands of categories in Google BigQuery? but looks like it doesn’t scale for numbers I have in my example
Can this approach be scaled for my example?
1.4m articles
1.4m replys
5 comments
57.0k users