Google Cloud Datastore and reports/administration - google-app-engine

I'm quite new to Google App Engine and it's cloud Datastore which is used for storing the backend's data by default. As far as I realized you can only view it's content within the developer console and you can create or edit entities there.
But is there any external tool from which you can connect to your datastore to create reports or administer the data? What is your experience?

In fact yes it's true you can only see data's from the admin console.
If you wish to see your data's in Google Drive Table and make a report you can, but for that you need to create a connector to your sheet (I already made one). It's exactly the same if you need update or import data's to your datastore.
I use this Technic to upload or refresh products on my e-shop GAE app.
In general if I need to see a report, I design a specific web page for that and I protect theme via a login / password. To see a well formatted report you can use jquery library or use Google Charts

Related

Google Data Studio User Security

I am in the process of creating a few dashboards for my organization. We currently use a few different cloud based applications where we authenticate with Google Chrome.
Does Google Data Studio have the ability secure access and or filter content based on your google account?
For example, if I create a dashboard with data for User(s)#domain.com will I be able to set a filter in the data source or dashboard to allow USER A to see only sales data they generated? My user population is over 5k so individual reports are not an option.
Not natively. I'm not sure about your datsources but in Google Bigquery you can create views which serve the same purpose
row permissions in BigQuery

Importing application models from Google cloud shell

I am very, very new to Google App Engine, but I need to administer a WebApp2 (so, Python) -based website that uses it. Specifically I need to filter a queryset and delete certain model instances.
Building the site locally is fine. Locally I can get at the models by hitting
http://localhost:8000/console
in my browser. This pulls up the "interactive console", and in there I can put some code like
from application.models.user import User
and it will work. From there I can create / delete User objects in the Datastore, so this local interactive console seems to have ORM-like functionality. (I'm coming from a Django background, so that's what it reminds me of).
However I don't seem to have this option on the live website. I was hoping to find it at
https://console.cloud.google.com/home/dashboard?project=<my project>
And I thought I had found it when I found the control to "activate google cloud shell". This brings up a command line on the web server, but the website's codebase doesn't seem to exist here, so launching the Python cli and trying to import the applications models like I can do locally doesn't work. And even if I could, I doubt it would be a Django-like ORM the way it is on my local build.
Am I thinking about this in the wrong way? How do you create / filter / delete / etc. Datastore objects via the backend in a GAE / WebApp2 website? Is the "Google cloud shell" even part of the answer?
To get access to your app code in the cloud shell one option would be to create in the shell a local copy of your app repository. For an example (addressing a different question, true) you can peek at Google Cloud: How to deploy mirrored Repository. But I'm not 100% certain if that will automatically give you access to your app's datastore. Worth a try IMHO.
Another option is to hook the desired operations as handler actions inside your app itself and execute them from there. Eventually hidden/protected/restricted via authentication, for example for admin users only. This is what I use for one-time datastore migrations that I need from time to time when I make changes to my entity models.
Finally, but not really a programatic access - you could use the Datastore page in the developer console to manually find, read and modify your entities, see Managing Datastore from the Console.
Use the remote_api_shell. You run this locally where your application code lives. Then you can import your models, and perform the same queries etc, and add modify/delete entities. I use this frequently for a range of tasks. Updating more than 100K records can become slow using this method.
https://cloud.google.com/appengine/docs/standard/python/tools/remoteapi

Salesforce: is it possible to develop a web application on top of Salesforce

Let me start with a bit of background: I'm helping a non-profit organization that would like to have a browser-based application that is backed by Salesforce, but has very specific requirements.
I see Salesforce has a REST API that we can call, so we can develop a standalone application to serve the web pages they want and use the REST API to call Salesforce when needed.
I'm wondering if there is a way to host a web application directly on Salesforce; this way we don't have to have a separate application server. Any recommendations or pointers to documentation/open source products is greatly appreciated.
Yes, you can create services that will allow your app to hit Salesforce
Depending on the type of application, yes you can host it on salesforce using the Salesforce Sites feature, also you can develop and host your app on Heroku which is owned by salesforce and can sync data to and from salesforce using Heroku Connect, or you can build and host it on another service like AWS and connect via the REST API. You just need to investigate and choose the option that best fits your use-case. One thing to be aware of is that there are API limits (the number of calls you can make to salesforce in a rolling 24hr period). Depending the the needs of the app be sure to see if those limits will be an issue. Because if the app makes constant calls to salesforce that could be an issue. But there are things you can do to get around that, like caching.
Yes, both Force.com Sites and Site.com features allow you to host webpages on the Force.com Platform. The markup is stored in Visualforce Pages and can use Apex to access records in the Database. I have migrated multiple websites (including our company's www.mkpartners.com) to Force.com using Force.com Sites.
One thing to keep in mind is that you are limited to 500,000 views per month and the rendering of a page with images that are also stored on the platform will incur a single view for the page and a single view for each image. If you already have a very popular website, I wouldn't migrate. If you're a small business or nonprofit, then it should be fine.
Another thing to keep in mind is that dynamic functionality based on records in the database will not work during maintenance windows. There is the ability to upload a static version of your website to be rendered during these windows though.

Is there a way to interactively create a new Datastore entity kind for Go GAE apps?

Is there a way to create a new Datastore entity kind via some interactive means for Go App Engine apps? The datastore viewer won't let me add new entity kinds, and the interactive console doesn't seem to support Go.
I'm trying to upload some configuration data to datastore, including sensitive data that I don't want to appear in code. So far the best method I can come up with is to write some code to write an empty configuration entity, deploy, run, then use the datastore viewer to set the values.
Thanks in advance.
You absolutely can add new Entity Kinds in the Console.
In the Cloud Console, Click on the Datastore menu item, then 'Create an Entity'. Handy link, just select your project name
Then in the Kind field, just type in your desired Kind name.
First of all your code is safe at AppEngine - nobody can download it. At least nobody outside of Google. You can deploy it to a dedicated version/module and restrict usage to yourself (check current user, ask pass-phrase, etc in your code).
Second you can use Remote API - this way you do not upload any code to AppEngine. You can create entities remotely as you wish using secure HTTPS connection.

Developing for Google App Engine and using the datastore

I am just getting started with Google Web Toolkit and Google App Engine and have a quick question. I think I understand how to use the datastore now but I was wondering if there is a way that I can quickly create a "database" with static data from an excel sheet? I just need to add some data for a proof of concept later this week.
I am picturing something similar to a SQL database browser where I can just import the data?
I developing in Eclipse with appropriate plugins.
Thanks,
Rob
The easiest way to do this would be to save your spreadsheet as a CSV file, then use the bulkloader to load it into the datastore.
Your best bet is probably to write something to handle uploading it, or to handle processing it on the server.
However, you should also look at the bulk loader. It might be able to save you a little bit of time.
Here is the API (Google Documents List API) that "allows client applications to programmatically access and manipulate user data stored with Google Documents".

Resources