'Redshift json_serialize double quotes
I am ingesting (COPY) json data from S3.
Initially storing in a single SUPER column, and then extracting out the individual attributes into a normalised table/columns with the usual datatypes for each (varchar, integer etc..)
My problem is with this
json_serialize("json"."myattribute") as "mycolumn"
the resultant values are coming out with the original json double quote wrapping
"apples"
where I want just
apples
of course I could do a 'replace', but still hoping that there might be a simple way to extract without the quotes in the first place ?
Thanks
Solution 1:[1]
assuming "json" is a column with super type:json.myattribute
returns super type, that's why you see double quotes.
try this json.myattribute::varchar
.
it returns character without quotes.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | se02ijtx |