You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "c2h4ds (via GitHub)" <gi...@apache.org> on 2023/02/02 09:00:55 UTC

[GitHub] [pinot] c2h4ds opened a new issue, #10220: How to extract json-object and count the value

c2h4ds opened a new issue, #10220:
URL: https://github.com/apache/pinot/issues/10220

   I have a json-type column in pinot like below:
   `{"value1":1, "value2":2, "value3":3}`
   `{"value1":2, "value4":4, "value5":1}`
   `{"value2":3, "value3":1}`
   
   now I just wanna extract the key and count the value of each key, the result is shown like below:
   `"value1":3`
   `"value2":5`
   `"value3":4`
   `"value4":4`
   `"value5":1`
   
   I mean there are more than 5 kinds of "values"(maybe value6, value7 ...) so how to write the corresponding sql ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] siddharthteotia commented on issue #10220: How to extract json-object and count the value

Posted by "siddharthteotia (via GitHub)" <gi...@apache.org>.
siddharthteotia commented on issue #10220:
URL: https://github.com/apache/pinot/issues/10220#issuecomment-1414485261

   @Jackie-Jiang  @c2h4ds - please take a look at the KVGEN functionality I had described in https://github.com/apache/pinot/issues/7881
   
   While, it is not a "Standard SQL" function, it is commonly supported in OLAP engines to allow analysis on nested data


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on issue #10220: How to extract json-object and count the value

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #10220:
URL: https://github.com/apache/pinot/issues/10220#issuecomment-1414398919

   I don't think pinot can do it as of now. The json extraction is key based, meaning the key has to be provided. The workaround would be to store each key as a separate column, but it can potentially result in too many columns.
   Do you know any other database or query engine that can solve this request? We can potentially build an aggregation function to solve it, but I don't think that is a general solution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org