Skip to main content

group_concat of flex table values issue

  • March 13, 2015
  • 2 replies
  • 17 views

Trevor_Newman
Forum|alt.badge.img

Hi,

 

I have a flex table and I am trying to concatenate values using :-

 

set search_path to public;

select a.id , group_concat(a.values) OVER (PARTITION BY a.id)
from (
select __identity__ as id, mapitems(sourceGroups) OVER(PARTITION BY __identity__) from testJSON
) a;

 

I get the error :-

 

 16:46:15  [SELECT - 0 row(s), 0.000 secs]  [Error Code: 2858, SQL State: VP001]  [Vertica][VJDBC](2858) ERROR: Could not find function definition

 

The group_concat function is there in our public schema.

 

Capture.PNG

 

 

I can select the value a.id and a.values I just can't seem to do a group_concat.

 

I have googled for a soluiton but come up blank.

 

Any ideas?

 

Thanks,

 

2 replies

Navin_C
Forum|alt.badge.img+2
  • Participating Frequently
  • March 13, 2015

Are you able to use this funciton on regular tables.

 

Can you try this:

select group_concat(node_name) over () from nodes;

 

Hope this helps.

NC


Trevor_Newman
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • March 13, 2015

Hi Navin,

 

Sp this is strange - I made sure everyone had access to the group_concat in the 'public' scheme by doing a grant to public (i.e everyone). The command still failed with the same message

 

It turns out we have the same group_concat finction in a different schema and if I referenced that - it worked fine.

 

So I guess my issue is resolved but it strange the 'public' schema version did not work.

 

Thanks for your help.