I have a complex type and I want to query it using Athena
{id={s=c937b52e-fee8-4899-ae26-d4748e65fb5f}, __typename={s=Account}, role={s=COLLABORATOR}, updatedat={s=2021-04-23T04:38:29.385Z}, entityid={s=70f8a1a8-6f20-4dd3-a484-8385198ddf97}, status={s=ACTIVE}, createdat={s=2021-04-23T04:38:20.045Z}, email={[email protected]}, showonboarding={bool=true}, position={s=beta}, name={s=User2}, lastlogindate={s=2021-04-23T04:41:07.775Z}}
How to do it?
SELECT c.*
FROM "db"."table" c
LIMIT 10
returns all data in the table. However if I select like
SELECT c.id
FROM "db"."table" c
LIMIT 10
it shows the error.
Thanks in advance.
CodePudding user response:
The query is missing name for column which stores the shown data. You should change your query to something like:
SELECT c.some_column_name.id -- use real column name instead of some_column_name
FROM "db"."table" c
LIMIT 10