newbie
newbie

Reputation: 55

Denodo equivalent of collect_set, named_struct in Hive

I have a query which is in Hive as follows Select acc, collect_set(named_struct ( 'acc', acc, 'name', name, 'age', age)) group by acc

But this is not working in Denodo VQL. What is the corresponding functions for these that will work in Denodo VQL

Upvotes: -1

Views: 41

Answers (1)

bklein
bklein

Reputation: 71

To achieve something similar in Denodo, you can try using GROUP_CONCAT to concatenate the fields in JSON format. Here's an example for your case:

SELECT acc, GROUP_CONCAT(false, ', ', '', acc, name, CAST(age AS STRING)) AS details FROM your_table GROUP BY acc

I think that this will allow you to group the data and simulate a structured format using strings. Hope this helps!

Upvotes: 0

Related Questions