2

I want to connect to google datastore from normal java application not GAE app, then create entity, put/get properties and build GQL query. Is this possible?? I found APIs but I don't find any sample code explains how I can connect and make the authorization to the datastore. Is it similar to this for GCS??

Thank you,

1 Answer 1

2

There are examples in the getting started guide for Cloud Datastore.

Sign up to request clarification or add additional context in comments.

1 Comment

The example looks right for the question, I think this answer should highlight that its getOptionsfromEnv() method depends on the exported DATASTORE_SERVICE_ACCOUNT and DATASTORE_PRIVATE_KEY_FILE environment variables. About the second question, the GCS StorageSample uses GoogleAuthorizationCodeFlow.Builder which relies on GoogleClientSecrets loaded from a /client_secrets.json, so that software is rather different.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.