diff --git a/ibis/expr/types/core.py b/ibis/expr/types/core.py index 8279809dbc42..2da8edb2879f 100644 --- a/ibis/expr/types/core.py +++ b/ibis/expr/types/core.py @@ -383,6 +383,16 @@ def get_backend(self) -> BaseBackend: BaseBackend The Ibis backend. + Examples + -------- + >>> import ibis + >>> con = ibis.duckdb.connect() + >>> t = con.create_table("t", {"id": [1, 2, 3]}) + >>> backend = t.get_backend() + >>> backend.name + 'duckdb' + >>> type(backend) + """ return self._find_backend(use_default=True) diff --git a/ibis/expr/types/relations.py b/ibis/expr/types/relations.py index bf8265eae53e..1dfaaa879184 100644 --- a/ibis/expr/types/relations.py +++ b/ibis/expr/types/relations.py @@ -182,7 +182,16 @@ class Table(Expr, _FixedTextJupyterMixin): __array_ufunc__ = None def get_name(self) -> str: - """Return the fully qualified name of the table.""" + """Return the fully qualified name of the table. + + Examples + -------- + >>> import ibis + >>> con = ibis.duckdb.connect() + >>> t = con.create_table("t", {"id": [1, 2, 3]}) + >>> t.get_name() + 'memory.main.t' + """ arg = self._arg namespace = getattr(arg, "namespace", ops.Namespace()) pieces = namespace.catalog, namespace.database, arg.name