google-cloud-datastore

Cross Group (XG) Transactions and Further Explanation of use

偶尔善良 提交于 2019-12-11 05:40:12
问题 The most recent release of the GAE states the following changes: Datastore Cross Group (XG) Transactions: For those who need transactional writes to entities in multiple entity groups (and that's everyone, right?), XG Transactions are just the thing. This feature uses two phase commit to make cross group writes atomic just like single group writes. I think I could use this change within the code of a project I created a while ago but I would like further information regarding this update to

Figure out group of tasks completion time using TaskQueue and Datastore

风格不统一 提交于 2019-12-11 05:36:29
问题 I have a push task queue and each of my jobs consists of multiple similar TaskQueue tasks. Each of these tasks takes less than a second to finish and can add new tasks to the queue (they should be also completed to consider the job finished). Task results are written to a DataStore. The goal is to understand when a job has finished, i.e. all of its tasks are completed. Writes are really frequent and I can't store the results inside one entity group. Is there a good workaround for this? 回答1:

DatastoreNeedIndexException even after defining the index

最后都变了- 提交于 2019-12-11 05:34:20
问题 I am baffled with a problem with my DataStore query on GAE java -- it always complain that I don't have a matching index, even though I have the exact index they suggested in my datastore-indexes.xml -- can something shed some light before I pull all my hair out? com.google.appengine.api.datastore.DatastoreNeedIndexException: no matching index found. The suggested index for this query is: <datastore-index kind="Users" ancestor="false" source="manual"> <property name="BILLING_ENABLED"

Deleted Datastore entries reappear

对着背影说爱祢 提交于 2019-12-11 05:28:07
问题 I'd like to re-open Deleted Datastore entries reappear as a registered user. Can the old question be deleted? I'll try to be more specific this time. I'm experiencing the following problem: Initially I put N entities of the same kind into the Datastore like that: datastore_entity = MyModel(model_property=property_value) datastore_entity.put() Afterwards I delete them. I have used the Datastore Admin interface as well as a self-defined handler for the mapreduce library in order to do so. The

Optimizing a inequality query in ndb over two properties

流过昼夜 提交于 2019-12-11 05:14:24
问题 I'm trying to do a query into a range of valid dates q = Licence.query(Licence.valid_from <= today, Licence.valid_to >= today, ancestor = customer.key ).fetch(keys_only=True) I know that Datastore doesn't support inequality queries over two propperties. So I do this: kl = Licence.query(Licence.valid_from <= today, ancestor = customer.key ).fetch(keys_only=True) licences = ndb.get_multi(kl) for item in licences: if item.valid_to < today: licence.remove(item) But I don't like because I think

When using allocateIds(), how long do unused IDs remain allocated?

三世轮回 提交于 2019-12-11 04:55:22
问题 Assuming the IDs have not been used by calling put() for an Entity. How long would the allocated IDs stick around for? Are they ever put back into use by datastore? Or are they allocated forever? 回答1: The documentation says, These keys are guaranteed not to have been returned previously by the data store's internal ID generator, nor will they be returned by future calls to the internal ID generator. I'll go out on a limb and say that the use of 'guarantee' and 'future' above means forever .

Is datastore good for storing hr shifts?

五迷三道 提交于 2019-12-11 04:49:44
问题 everyone. I'm trying to figure out if Google Datastore is the best option in my case.. I need to store employees with theirs schedules like: id name schedule Schedule looks like: Mon 10am-10pm (simple) Tue 10am-5pm, 5.30pm-8pm (multiple, not even hours) .. Sun 6pm-4am (start/end are in different days) one of the APIs returns if employee is working NOW or not I tried to play with datastore but GQL queries appeared to be very limited, for example you cant compare in one query two different

Google Cloud Platform Data Display

丶灬走出姿态 提交于 2019-12-11 04:29:12
问题 I currently have an app running on Google Cloud Platform that is collecting a decently large amount of data and storing it in Google Cloud Datastore, and I am displaying this data in plots using Google Data Studio. However, in order to do so, I have to send backups of the data to Google Cloud Storage, and then load these backups into Google BiqQuery, which can then be plotted on Google Data Studio. Since my app is collecting live data in real time, this is a less-than-ideal solution, as I

Can we access gsutil from Google Cloud Dataflow? if yes, then could someone please explain with example?

心已入冬 提交于 2019-12-11 04:14:51
问题 I'm new with google cloud dataflow and I need to copy files in GCS (Google Cloud Storage) from one bucket to another and rename. Answer with example would highly appreciated. 回答1: Technically yes you can do this, but it would be better if you used Dataflow to just pick up the files and move them over to the new bucket instead of as a wrapper around gustil. The class you need should be beam.io.gcsio.GcsIO() and that should be able to pick up and put down files where you need it too. 来源: https:

AppConfigNotFoundError for dev_appserver.py on Django-nonrel and Google App Engine

本小妞迷上赌 提交于 2019-12-11 03:52:14
问题 I'm trying to clear my local db like explained in the docs But when I try and run the dev_appserver.py --clear_datastore command I get google.appengine.tools.dev_appserver.AppConfigNotFoundError dev_appserver.py --clear_datastore dennys Traceback (most recent call last): File "/usr/local/bin/dev_appserver.py", line 76, in <module> run_file(__file__, globals()) File "/usr/local/bin/dev_appserver.py", line 72, in run_file execfile(script_path, globals_) File "/Applications