google-cloud-datastore

Python BigQuery API - get table schema

蹲街弑〆低调 提交于 2019-12-12 09:46:38
问题 I am trying to fetch schema form bigquery table. Given a sample code like from google.cloud import bigquery from google.cloud import storage client = bigquery.Client.from_service_account_json('service_account.json') def test_extract_schema(client): project = 'bigquery-public-data' dataset_id = 'samples' table_id = 'shakespeare' dataset_ref = client.dataset(dataset_id, project=project) table_ref = dataset_ref.table(table_id) table = client.get_table(table_ref) # API Request # View table

Importing GeoPt data with the Google AppEngine BulkLoader YAML

对着背影说爱祢 提交于 2019-12-12 09:03:01
问题 I am uploading data from a csv file with a GeoPt column in it. I have the GeoPt column data in quotes like this: SomeData,"54.321,-123.456",MoreData My bulkloader.yaml file has an entry like this: - property: location external_name: LOCATION # Type: GeoPt Stats: 1 properties of this type in this kind. When I do the upload and go to the DataStore viewer I see the location has been uploaded as a string instead of a GeoPt. I'm not sure what the proper way to import this would be. Perhaps it

ndb.BlobProperty vs BlobStore: which is more private and more secure

℡╲_俬逩灬. 提交于 2019-12-12 08:39:31
问题 I have been reading all over stackoverflow concerning datastore vs blobstore for storing and retrieving image files. Everything is pointing towards blobstore except one: privacy and security. In the datastore, the photos of my users are private: I have full control on who gets a blob. In the blobstore, however, anyone who knows the url can conceivable access my users photos? Is that true? Here is a quote that is supposed to give me peace of mind, but it's still not clear. So anyone with the

Inconsistent Fetch From Google App Engine Datastore

二次信任 提交于 2019-12-12 08:38:53
问题 I have an application deployed in Google app engine. I am getting inconsistent data when i fetch an entity by id immediately after updating that entity. I'm using JDO 3.0 to access the app engine datastore. I have an entity Employee @PersistenceCapable(detachable = "true") public class Employee implements Serializable { /** * */ private static final long serialVersionUID = -8319851654750418424L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY, defaultFetchGroup = "true")

Unable to access ID property from a datastore entity

久未见 提交于 2019-12-12 08:38:31
问题 Using Google App Engine SDK and Python, I'm facing an issue : I'm unable to access the ID property of a given entity properties. The only properties I can access are those defined in my class Model, plus the key property (see answer below) : class Question(db.Model): text = db.StringProperty() answers = db.StringListProperty() user = db.UserProperty() datetime = db.DateTimeProperty() I can access text, answers, user, datetime and key properties just fine. However, I can't access the ID

How to download all datastore entities on Google App Engine?

醉酒当歌 提交于 2019-12-12 07:25:55
问题 I've read the GAE docs, and I can't seem to figure out how to download all my entity data. What I'd love to do is download the whole thing as a big TSV file (or something I can easily munge into one), so I can import my various entities into a spreadsheet and fiddle with them. But I'm stuck at the starting gate. I don't understand the first few bits of the docs: "This document applies to apps that use the master/slave datastore. If your app uses the High Replication datastore..." -- I'm not

How to auto-fetch JDO nested collection of entities?

安稳与你 提交于 2019-12-12 07:20:53
问题 Probably a very trivial problem. I have an object that looks like this: @PersistenceCapable public class Parent { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private String _id; @Persistent private List<Child> _children; //... } ... the nested entity looks like this (I am forced to declare primary key as Key otherwise it won't persist): @PersistenceCapable public class Child { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key _id;

How to model a contract database (with several buyers or sellers) using GAE datastore

ぃ、小莉子 提交于 2019-12-12 06:25:43
问题 I'm new to programming and I'm trying to grasp the concept of the GAE datastore. I'm trying to build an app to make it easy write contracts (http://contractpy.appspot.com) and I'd like to know: how to model a database to record contracts (considering that a contract can have several people on the same side of the transaction)? In the relational model, I would do the following: create a table for people, then a table for the contract and a third table with reference to people that have

Google Console - Cloud Datastore Query returning “Backend Error”

拥有回忆 提交于 2019-12-12 06:19:08
问题 In Google Console, I get "Backend Error" when trying the access Cloud Datastore administration screens ( Dashboard & Query screens return " Backend Error ". Index screen works, somehow). When looking at my App Engine Logs, I see this in my default module logs: 404 - /datastore/v1beta2/RunQuery Error 404: The resource could not be found. The same code in development, and deployed to another App Engine application works perfectly. Any idea what's going on? 来源: https://stackoverflow.com

GAE datastore index limit

…衆ロ難τιáo~ 提交于 2019-12-12 05:48:53
问题 1st, my application, in quota details, the number of indexes get reach to 200 of 200. but when i count in Datastore Indexes, its over 200 indexes. so why i can add more than 200 indexes ? 2nd, in https://cloud.google.com/appengine/docs/quotas Free Default Daily Limit of number of indexes is 200* ( *. not a daily limit but a total limit) So it's mean when you pay for it you will add more than 200 indexes? is that true ? 3rd, my code : ModelMeta meta = ModelMeta.get(); List modelList =