whale
whale copied to clipboard
Add SSH tunneling capabilities.
Currently, it's a bit difficult to set up metaframe in some companies where you have to ssh into a devbox to run your queries. It's possible, however, to get around this by using paramiko
to set up an SSH client to execute your query in your devbox, pipe the results to a csv, then scp the results back to localhost.
To enable this, we can add an ssh
argument to our extractors to enable this pattern, using a gateway machine. I'm not entirely sure how this works for every sort of database, but I know for presto this looks something like client.execute('presto --execute {}'.format(query)
.