redash icon indicating copy to clipboard operation
redash copied to clipboard

Google Spreadsheets: when the spreadsheet not found show the service account email address

Open arikfr opened this issue 6 years ago • 12 comments

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.

arikfr avatar Oct 14 '18 06:10 arikfr

Can you tell a bit more about how to extract the service account email address through jsonkeyfile? I could not figure it out.

adityashrm21 avatar Oct 14 '18 08:10 adityashrm21

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).

arikfr avatar Oct 14 '18 08:10 arikfr

Hi @arikfr, Is this issue still up for grabs? I'd like to work on this. Thanks!

YashJipkate avatar Oct 06 '19 18:10 YashJipkate

@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?

arikfr avatar Oct 07 '19 07:10 arikfr

Is this issue still not solved @arikfr ?

kurianbenoy avatar Aug 18 '20 17:08 kurianbenoy

If this issue is still open, can I work on it?

Dyex719 avatar Apr 05 '23 07:04 Dyex719

@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.

arikfr avatar Apr 05 '23 13:04 arikfr

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 avatar Oct 12 '23 02:10 robokage

@robokage sure, feel free to open a PR and tag me on it :)

guidopetri avatar Oct 12 '23 02:10 guidopetri

@robokage sure, feel free to open a PR and tag me on it :)

Great I'll start working on it

robokage avatar Oct 12 '23 02:10 robokage