Constructing JSON directly within SQL queries (converting rows to JSON)

0

I need to construct a complex JSON which replicates the structure of API response using sql query, in order to compare both for testing purpose. Can/will redshift support JSON functions (such as json_build_object, rows_to_json, json_agg, array_to_json...) to build complex JSON queries. If not, is there any alternative?

1 réponse
-1

Hi,

So far, Redshift supports only these JSON functions. Also, OBJECT_TRANSFORM function could help. Please check if they satisfy your requirements.

profile picture
EXPERT
répondu il y a 4 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions