Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.6.12
-
None
-
Ubuntu 22.04
Description
Given a sort of EAV table with the attached data, I tried defining a PIVOT table to transform the `campo` in actual columns, where the value would be `valore`, and the remaning `id_*` fields would be the remaning key fields as
CREATE OR REPLACE TABLE my_pivot_table
ENGINE=CONNECT
TABLE_TYPE=PIVOT
TABNAME=my_source_table
OPTION_LIST='user=connect,PivotCol=campo,FncCol=valore,GroupBy=1';
However this produces the wrong structure, as seen in the second sheet of attached data.
Here you see the `id_*` fields are repeated for each field determined by `campo`, and each rows populates only one field, leaving the others empty, while I would have expected a single row with all the fields populated.
I think the table definition is incorrect, hence this appears to be a problem in the connect engine itself.