Storing gzip in collection

I have a backend generated (JSON) object that I need to store. But sometimes it exceeds the 500K row limit. So I want to use node-gzip to compress it.
Question: what field type in wix-data do I use for that?

Or is there another way to go about it?

Thanks.

Can’t you generate json file in the backend-media and store the file url in your collection? This way I think (but am not sure) you shouldn’t have the 500k limit.

(but you won’t be able to easily query the object properties. The question is if you need it to be query-able).

Thanks J.D… Never worked with backend-media, but I’ll look into it. Other solution I was thinking about was to .stringify the JSON, cut it into pieces if over 500K and store as strings in several rows and when needed, glue them back together again and .parse.
Off the cuff, which one would have your preference?
P.S. I do not need to query anything inside it, just store and retrieve.

@giri-zano yes, I thought of splitting the object too.
I guess this option (the split object) is easier to handle unless you need to split it into too many fragments).
For these reasons:

  1. I think it’s less code to write and the storing process is faster.

  2. It is easier to update.

  3. If the json contents needs to be private, it’ll be much more secured to save it in the collection.

  4. I looked at the docs and saw that media-backend currently doesn’t not support .json files, so if you go for my solution you’ll have to upload it as .txt file and serve it as json (which is possible but less nice).
    Bottom line, the split object will probably be the better solution.

@jonatandor35 Thanks, will go that way then. Hat tip.