Reputation: 1999
Can I store Thousands / Millions values in ndb.JsonProperty in Google App Engine?
Upvotes: 1
Views: 1001
Reputation: 3711
Unless you are exceeding the entity+key size limit of 1MB, you can store any number of values.
There is a limit on size not on number of values while storing.
Upvotes: 2
Reputation: 99
There is a 1M limit on a put request. So the total size of the object you are storing can't exceed that.
Upvotes: 0
Reputation: 8221
My speculation was what @Lipis stated but reality is different. According to the docs the maximum size of the entity can be up to 1Mb. JsonProperties are also calculated in the size of the entity and if the whole entity is greater than 1Mb you will receive an error
The request to API call datastore_v3.Put() was too large.
So the answer is that no, you cannot store more than 1Mb per entity uncompressed as @dmitry notes.
If you need a bigger Json object to be stored along with your entity you will have specifically to define it as a Blob and then you can go up to 32Mb.
Upvotes: 3
Reputation: 21835
While I'm not sure what the exact limit (if there is any) the ndb.JsonProperty
values are stored as Blobs, which means they can store a lot of properties. Practically though you might run into other problems processing millions of values. I would suggest you to try with some test data with hundreds and move on steadily to thousands or even millions.
Upvotes: 4