emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jay Zawrotny <jayzawrotny@gmail.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Combining ob-sql, docker-tramp, and tramp ssh?
Date: Wed, 21 Oct 2020 18:11:27 -0400	[thread overview]
Message-ID: <CAEXOEF0NUPzVPJp6C3UzA=8uukp=RJbUpRh85W9waLSCVoFx7w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 868 bytes --]

I've been using ob-sql to document & prune our dev db and it's been
amazing.

https://media.discordapp.net/attachments/428916969861808130/768589313964507166/image0.gif

The only rough edge has been that I have to expose the SQL ports to my
host, forward it over ssh (I'm using a remote machine to offload docker
resources), then install a version of psql required to connect. Lastly I
then need to symlink psql to point to the targeted version of psql I need.

This means I can only match one setup at a time. A preferred route would be
to use the :dir property to eval over tramp like:

#+begin_src sql :dir "/sshx:user@devbox|docker:user@vm:/src"
SELECT count(id) from accounts;
#+end_src

If I use Python it works, but something specific about this combo is not
working. Any suggestions to fix this, personal config, docs, or debugging
steps one could point me to?

[-- Attachment #2: Type: text/html, Size: 1284 bytes --]

             reply	other threads:[~2020-10-21 22:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21 22:11 Jay Zawrotny [this message]
2020-10-21 23:58 ` Combining ob-sql, docker-tramp, and tramp ssh? Tim Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEXOEF0NUPzVPJp6C3UzA=8uukp=RJbUpRh85W9waLSCVoFx7w@mail.gmail.com' \
    --to=jayzawrotny@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).