For existing entity on Google Cloud Datastore I would like to add a new property "s11_data" for all of the keys within that entity. I click on a key and click on New Property and name it appropriately, save, and voila. It is now a property column [set to null] for all of the keys. But I want this property to be a Blob (like some of the existing entries are already). If I click one of the existing entries, then "Blob" is an option in the drop-down menu of the property pane.
But it is not an option for the new property. I thought the resolution was to be sure to turn off indexing. But nope, even with Index unchecked the Blob option does not appear.
I'm happy to set it via Python is that is best way forward, but I can't work that out either (I can client.put()
a property value but cannot find how to assign a property type.
Suggestions appreciated. Thanks,
If you wish to do it in code via Python, then I don't believe blob
is a property if you're using the datastore library
(see types). But you can get it as a property if you're using the ndb library
bundled ndb library
, then you can set the property type in your model definition (see documentation for property types) e.g. s11_data = ndb.BlobProperty()
cloud ndb library
, you also define it in model definition (see documentation) e.g. class YourModel(Model):
s11_data = BlobProperty()