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?

Priyesh
gefragt vor 4 Monaten350 Aufrufe
1 Antwort
-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
EXPERTE
beantwortet vor 4 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen