DEV Community

Run SQL in Slack

Katie Hindson on November 24, 2020

Write SQL in Slack and bring the latest analytics into the conversation. In my first week at Hubble, a teammate shared a SQL query he'...
Collapse
 
rajat19 profile image
Rajat Srivastava

hi,
clicking the link provided above landed into
It looks like something has gone awry. Don’t worry, it’s not your fault, but you can’t install Beacon at the moment.
do i need some kind of permission ?

Collapse
 
tylerauerbeck profile image
Tyler Auerbeck

You likely need to be an admin of your workspace to be able to do this. One thing to double check is to make sure that if you're a member of multiple workspaces that when you click on the above link, that you're landing in the workspace that you expect.

Collapse
 
turinglovesdeathmetal profile image
Katie Hindson

Hey Rajat!

As Tyler said, you need to be an admin of your workspace to be able to install the app. Once it's installed in the workspace, then any user in that workspace can add it into their visible set of Slack apps (in the Apps section in your sidebar) and connect to your database 😊

Please let us know if you're still having problems with installing it though! We'd be more than happy to try to help figure out what's going on 🕵️‍♀️

Collapse
 
turinglovesdeathmetal profile image
Katie Hindson

Hi again! The error was because I added the wrong install link to the blog post (rookie mistake on my part 😅). I've updated the link in the post, and you can also install it right here

Thread Thread
 
bhealy profile image
Bobby Healy

I'm getting this error. Any ideas?

You don't have access
Troubleshooting Info
User:robertjohnpatrickhealy@gmail.com
URL:https://slack-sql.gethubble.io/slack/redirect?code=553637353621.2369055151330.6f65bd6bdbbfa00ed8c2b82b4e4f9a5d14196a887a637b8614449e7646f87821&state=dev.to
If you should have access, please contact gcp-mcloud-admins@panubo.com and provide the troubleshooting info above.

If you're signed in with multiple Google accounts, try a different account.

Collapse
 
tryonlinux profile image
Jordan Tryon

Just some issues I’ve learned from working with huge amounts of data and users and trying to enable more ease of use when it comes to running queries.

These are just some things I think of to prevent being bitten:

Read only access, so users don’t Willy Nilly drop tables and delete/update data with a bad query

Some type of user control based on what they can see.

Leaning towards non locking queries and maybe even forcing it depending on situation to prevent table locks

Limits on amount of data to pull back. Millions of records in a slack chat lol.

Otherwise I love it and wish it was something I could use where I work l, but sadly it would open up a cluster of issues lol. We have very strict controls on database access and queries.

Collapse
 
turinglovesdeathmetal profile image
Katie Hindson • Edited

Hey Jordan! Wow, I love all of these points - I feel like we've definitely run into a lot of the same problems when it comes to SQL collaboration 😅

For read-only access, I definitely agree that it's important to monitor/grant to people who don't actually need to change the data (aka most people).

What's great about Beacon is we actually use the same database credentials that a user already has! So that means, if you have read-only access, then we'll grant you read-only access in the SQL app. Hopefully the folks who do have write access aren't being too Willy Nilly in their SQL querying 😉

User control on viewing outputs + preventing locking queries are both interesting points! We haven't dug too much into that yet, but will definitely consider it for potential features.

For limits on data pull back, Beacon only posts the top 10 results of your query. It took us one really long Slack post to realize that we definitely needed to add that feature in 😅

We have very strict controls on database access and queries.

This is really great information! Would it still be a problem given that Beacon actually uses someone's existing credentials for a database?

Collapse
 
tryonlinux profile image
Jordan Tryon

Ah that is good to hear, when I first looked at this I guess I assumed it was using a non-person ID for SQL access in the backend. So that is cool and solves the whole bad query issue if users have read only access, which I’d hope in real life every company sets their users up that way and does modifiable changes with a NPID and uses store procedures or prepared sql in an app, but that’s a pipe dream hahaha.

And sweet was wondering about how large results were handled. Lol

To answer your question at the end. If I didn’t deal with PHI that can’t be sent even though slack due to being off prem. Then yeah would probably be able to use it if everyone had read only access and queries were forced to be non locking.

Again, Great program!! If my job wasn’t so strict with data, this would save me a boat load of time as a developer when communicating with my internal customers. But to be honest I’m glad we do have the safeguards in place as I’ve noticed a lot of companies don’t and get burned because of it.

Collapse
 
dmahely profile image
Doaa Mahely

Love this idea! Will be trying it shortly :)

Collapse
 
turinglovesdeathmetal profile image
Katie Hindson

🤗 have fun with it, and let us know what you think!

Collapse
 
matrixtoolsbot profile image
Matrix Tools, LLC

I'm not familiar with any of those connectors. Is it possible to integrate with on prem sql server?

Collapse
 
ppfeiler profile image
Patrick

Are there plans to opensource this?

Collapse
 
turinglovesdeathmetal profile image
Katie Hindson

Hey Patrick! Currently, we don't have plans to opensource this, but will definitely let you know if that changes.

Collapse
 
ijaz20 profile image
ijaz20

Open-source this, please!