Replies: 26 comments 12 replies
-
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
Beta Was this translation helpful? Give feedback.
-
Hi Brylie, This may be of interest to you: |
Beta Was this translation helpful? Give feedback.
-
This works well, though it's hard to get it to work with non publicly shared google sheets. I'm pretty sure it's doable though. |
Beta Was this translation helpful? Give feedback.
-
By way of example, Redash accesses Google Sheets that are shared to a specific "email" https://redash.io/help/data-sources/querying/google-spreadsheet |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
Beta Was this translation helpful? Give feedback.
-
I think the @Stale bot is a bit misguided. I understand it is important to groom the issues, but this feature may be a while in the works. |
Beta Was this translation helpful? Give feedback.
-
@mistercrunch How do you make it work with non public sheets? |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
Beta Was this translation helpful? Give feedback.
-
Is it possible to flag issues, so the stale bot doesn't close them? I.e. this feature request seems important, particularly the need for private sheets. |
Beta Was this translation helpful? Give feedback.
-
@brylie pinned it so it won't get closed It'd be great to have a blog post walking people step by step. The short story is something like:
|
Beta Was this translation helpful? Give feedback.
-
@mistercrunch : |
Beta Was this translation helpful? Give feedback.
-
@hemantaggarwal |
Beta Was this translation helpful? Give feedback.
-
Full URI is |
Beta Was this translation helpful? Give feedback.
-
@redko-o : What mistercrunch told is the full URI which works for public sheets but I am unable to find a way to connect private google sheets with Superset. |
Beta Was this translation helpful? Give feedback.
-
@hemantaggarwal, @mistercrunch thanks for the hints! |
Beta Was this translation helpful? Give feedback.
-
@redko-o |
Beta Was this translation helpful? Give feedback.
-
@hemantaggarwal I think one way might be to give access of the Gsheets to that particular service account email ID. I think Redash does something similar. |
Beta Was this translation helpful? Give feedback.
-
Also, sorry if I'm misunderstanding, but was a final way found to connect superset to public Gsheets in an org? I went through this, but couldn't get how to do this in Superset itself. |
Beta Was this translation helpful? Give feedback.
-
@anshuman73 : Public gsheets are easy to connect like mentioned above, only issue is with private gsheets. |
Beta Was this translation helpful? Give feedback.
-
@hemantaggarwal Ahh, okay. Thanks for the clarity |
Beta Was this translation helpful? Give feedback.
-
Can you explain a bit about the workaround for private and org-based gSheets? |
Beta Was this translation helpful? Give feedback.
-
Any update on the workaround for private gSheets? Edit: I ended up figuring it out. A workaround is to share the sheet for anyone who has the link, then use that shared URL to query the Sheet. |
Beta Was this translation helpful? Give feedback.
-
For org-based sheets:
An example of Secure Extra: {
#"service_account_file": "/path/to/file.json", # either use service_account_file or service_account_info
"service_account_info": {
"type": "service_account",
"project_id": "gsheetsdb",
"private_key_id": "XXX",
"private_key": "-----BEGIN PRIVATE KEY-----\nXXX\n-----END PRIVATE KEY-----\n",
"client_email": "[email protected]",
"client_id": "109948634192943148536",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/shillelagh%40gsheetsdb.iam.gserviceaccount.com"
}
} This will give Superset access too all spreadsheets in the company. This means that if your CEO has shared a spreadsheet with To prevent this, the easy solution is to edit "Secure Extra" again and add this key:
Where The best solution is to replace
from sqlalchemy.engine.url import make_url
def DB_CONNECTION_MUTATOR(uri, params, username, security_manager, source):
driver = make_url(uri).drivername
if driver == "gsheets":
user = security_manager.find_user(username=username)
if user and user.email:
params["subject"] = user.email
return uri, params |
Beta Was this translation helpful? Give feedback.
-
I followed the instructions from @betodealmeida , but I had to change a few things to get things working.
|
Beta Was this translation helpful? Give feedback.
-
I ran the following lines in order to build a minimal workable example with Google Sheets: docker pull amancevice/superset
docker run --detach --name superset-container -p 8088:8088 amancevice/superset
docker exec -it superset-container pip install shillelagh==0.4.3
docker exec -it superset-container superset-init
docker exec -it superset-container superset set_database_uri -d "Google Sheets" -u gsheets://
docker restart superset-container Go to http://localhost:8088/, and then to SELECT * FROM "https://docs.google.com/spreadsheets/d/1_rN3lm0R_bU3NemO0s9pbFkY5LQPcuy1pscv8ZXPtg8/" |
Beta Was this translation helpful? Give feedback.
-
您好,你发的邮件我已收到。
|
Beta Was this translation helpful? Give feedback.
-
We have internal stakeholders who regularly work with data in spreadsheets. We would like to make it simple for them to get spreadsheet data into the data portal.
Since our staff use Google Sheets (and Drive), it would make sense that they could upload the data spreadsheets to google Drive and then connect them to Superset for dashboarding.
Alternatively, they could upload the spreadsheet to Superset, via the UI.
Beta Was this translation helpful? Give feedback.
All reactions