- Le plus récent
- Le plus de votes
- La plupart des commentaires
Hi rakibansary,
Unless I'm wrong, I cannot see the name of the SUPER datatype column in your query. In the following example, my SUPER datatype column, where the JSON record is stored, is called json_text.
SELECT x.json_text.id, v.value
FROM X as x,
x.json_text.sets as sets,
sets.values as v
Thanks,
Hi rakibansary,
The json_text column is just an example to show you how usually PartiQL is used on SUPER datatype columns.
SUPER datatype is used for semi-structured data such as JSON. The following link contains several examples on querying semi-structured data https://docs.aws.amazon.com/redshift/latest/dg/query-super.html#navigation.
If you are having a Parquet file with several columns and a json column, then you can use the SERIEALIZETOJSON option while copying the data to Redshift. You can find an example on the following link (the Copying data from columnar-format Parquet and ORC section) https://docs.aws.amazon.com/redshift/latest/dg/ingest-super.html#copy_json.
Thanks,
Contenus pertinents
- demandé il y a un mois
- demandé il y a un an
- Réponse acceptéedemandé il y a un an
Some more context - I actually have data stored as Parquet and not JSON - I guess SUPER doesn't apply to parquet.
x.json_text.sets fails for me with
Hint: Split into more than one FROM clause elements or use a JOIN operation to extract ARRAY elements
The problem here seems to be, json_text is an array.