ipython-sql
can be leveraged in querying CockroachDB. This will require a secure instance of CockroachDB for the reasons I will explain below.
ipython-sql
, a.k.a. SQLmagic to execute SQL queries against CRDB.
As stated earlier, we need to use a secure instance of CockroachDB. In fact, from this point forward, I will attempt to write posts only with secure clusters, as that's the recommended approach. Ipython-sql uses sqlalchemy underneath and it expects database URLs in the format postgresql://username:password@hostname:port/dbname
. CockroachDB does not support password fields with insecure clusters, as passwords alone will not protect your data.