Re:Pivot – Rows to Columns
by thenaturalist on Monday February 05, 2018 @02:26PM
(#16311285)
Yes, if you take a detour via Python. As Markus pointed out, you would still need to know data types and filter values in advance to configure the pivot - I would assume this is normally the case.
Using Python, you can build conditional rules for building a SQL query based on parametrized inputs with Jinja2. Example here: https://multithreaded.stitchfix.com/blog/2017/07/06/one-weir...
You can then execute said query with a given DB module.