I have a table with about 30k rows and each of them is put in {}
in the end I would like to get it like this:
[
{Objekt1},
{Objekt2}
]
This solution worked well, as we haven't had that many rows. But now we get this limit.
COPY INTO FROM (
SELECT array_agg(*) FROM (
SELECT OBJECT_CONSTRUCT( ......
OBJECT_CONSTRUCT(.....) )
from
(select * from (select
REPLACE(parse_json(OFFER):"spec":"im:offerID",'"')::varchar AS ID,
...,
... )))) )
FILE_FORMAT = (TYPE = JSON COMPRESSION = None )
credentials =
(aws_key_id=''aws_secret_key='')
OVERWRITE = TRUE single = true
HEADER = FALSE
max_file_size=267772160
We offer this to some external agency and that style is the only way, they can read it.
Is there another solution? Or a way to go around this problem?
Thanks
question from:https://stackoverflow.com/questions/65901325/max-lob-size-16777216-exceeded-for-array-agg