redash
redash copied to clipboard
Google Spreadsheets: when the spreadsheet not found show the service account email address
When trying to query a Google Spreadsheet and it wasn't found, as part of the message to the user show the service account email address.
Reasoning: many times the user tries to share it with their own email address or just not sure what address to share it with.
The Google Spreadsheet query runner implemented in this module: https://github.com/getredash/redash/blob/master/redash/query_runner/google_spreadsheets.py
Will need to alter this error message: https://github.com/getredash/redash/blob/e87efc8bc30cefa0176fea7f12169cf202452727/redash/query_runner/google_spreadsheets.py#L215
The service account email address is in the JSON key file.
Can you tell a bit more about how to extract the service account email address through jsonkeyfile? I could not figure it out.
Sure!
https://github.com/getredash/redash/blob/be377b5f594ba1715c429f0182e3ea2e00e22a9b/redash/query_runner/google_spreadsheets.py#L182
^ this is how the key file contents file are being loaded. Then there is a key which is the service account email (I think it's client_email
).
Hi @arikfr, Is this issue still up for grabs? I'd like to work on this. Thanks!
@YashJipkate thank you, but there are actually two open PRs for this issue. Both need some small changes, but probably there is no need for another implementation :grimacing:
Would you like to work on something else?
Is this issue still not solved @arikfr ?
If this issue is still open, can I work on it?
@Dyex719 yes, thanks! But check the old pull requests. At this point I don't remember what were the small changes needed, but you can probably get some ideas there.
Hi @arikfr if this issue is still open, I would like to work on it as part of hacktoberfest 2023. So please let me know
@robokage sure, feel free to open a PR and tag me on it :)
@robokage sure, feel free to open a PR and tag me on it :)
Great I'll start working on it