Replace backend options by something else
See original GitHub issuexref #2593 xref https://github.com/ibis-project/ibis/pull/2379#issuecomment-785510513
At the moment, this is valid Ibis valid code:
import ibis
ibis.options.impala.temp_db = 'foo'
client = ibis.impala.connect(...)
Ideally, we would like load a backend only if it’s used (on ibis.impala.connect
). But the code ibis.options.impala.temp_db = 'foo'
would fail if the backend has not yet been loaded. So, we are currently loading all backends on startup (skipping the ones raising ImportError
).
Personally, I think what makes more sense is that backends can’t implement global options, but they use connection parameters. With a unified connect
function (see #2532), it could look like this (it could also be implemented if we don’t unify connect
):
conn = ibis.connect('impala://user@impala/ibis_testing',
temp_db='foo')
There are probably other options, like making options
load backends, adding a .set_option
to the client… But I think the one above is clearer.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
Personally, I think the best for users would be using
ibis.connect(connection_string)
(see #2532). Not sure if when you meanibis_bigquery.connect
you meanBackend.connect
. But yes, I think it’s a good idea to makepartition_col
a connect parameter instead of an ibis option.It would be great to see what this would look like in a PR, but we can’t keep the issue open forever.