-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need to allow permission to pandas-gbq multiple times #33
Comments
Could you give an example of the sort of environment change you mean? Thanks |
Like installing a new package |
Could you link to a repo that has this problem? So I can reproduce exactly. |
I am not sure this is easily resolvable. I think it is because every time you are installing a package / adding to the requirements, you are technically having to do a new build and therefore the security permissions need to be done again. There may be a way around this but it might make BQ less secure, which I suspect we will want to avoid. We could think about adding in the security details in as an argument to pass to Docker when it builds.... is that possible?? Could we pass in the details as part of the Config file? |
The example I have to hand is the LTCs one but it's a large and very slow query on the more detailed prescribing data, so I'd suggest writing a simple query on a smaller table for testing! |
With this code: from ebmdatalab import bq
# -
df = bq.cached_read("SELECT * FROM ebmdatalab.hscic.normalised_prescribing_standard LIMIT 5", use_cache=False, csv_path="../data/foo.csv") I only have to authenticate with Google once even if I:
So I'm unable to reproduce per the report. I can reproduce if I shut down the notebook (and docker container) completely, which perhaps is what you're reporting? |
Is it possible that you are not updating packages from within docker, ie. using the command line, rather than the bash console within Docker.... See https://github.com/ebmdatalab/custom-docker/blob/clearer-doc/DEVELOPERS.md#installing-new-packages |
It happens with every docker repo I've used too. When I make any change to |
OK. So if we're talking about restarting the docker container, then yes, this is by design in the underlying libraries as each container is like a separate computer, and you wouldn't want your credentials being stored on other peoples' computers. I could work around this by writing some custom credentials code, which wraps this method with a custom |
For example, in writing the code for this PR: Not the end of the world, but I guess depends how much work it would be to work around. |
Probably not worth the effort of fixing if fiddly! |
|
It seems that every time you make changes to an environment, the first cell pulling data from bigquery fails to run and the permission process (pasting in a link and allowing pandas-gbq access via your google account) has to be repeated.
The text was updated successfully, but these errors were encountered: