Closed GoogleCodeExporter closed 8 years ago
The best advice for pivot simulation in BigQuery can be found on Stack Overflow:
http://stackoverflow.com/questions/26272514/how-to-pivot-table-in-big-query
To summarize it, BigQuery will not support a direct pivot in its current query
version, but many uses can be simulated through NEST() + INDEX().
Original comment by wes...@google.com
on 6 Jan 2016 at 10:23
Hi,
thanks for the answer, ofcourse is a way to do pivot, but in my case the
problem is that my columns are dynamic, and change every month. are there a way
to do it dynamic?
Original comment by JuanFh...@gmail.com
on 8 Jan 2016 at 4:05
Unfortunately no. If you don't know the column names ahead of time, the best
you can do is to write some client-side code against the BQ API to fetch the
table schema and build a query according to one of the Stack Overflow
suggestions linked above.
Original comment by jcon...@google.com
on 8 Jan 2016 at 5:24
oks, I hope soon will be enable pivot in BQ. Thanks for all!
Original comment by JuanFh...@gmail.com
on 8 Jan 2016 at 6:00
Original issue reported on code.google.com by
JuanFh...@gmail.com
on 29 Dec 2015 at 7:47Attachments: