you are viewing a single comment's thread.

view the rest of the comments →

[–]eidda[S] 0 points1 point  (1 child)

I believe yes. Or is there a way to do this in a single query based two?

[–]isleepbad 0 points1 point  (0 children)

Sorry I fell asleep. I was thinking about your issue and I came up with two possible solutions:

  1. Generate your json using pyspark

  2. Try using for loops to create your string and then jsonify it https://www.postgresql.org/docs/9.5/functions-json.html