You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the docstring, the method should fall back to a dbapi interface if the default value of dataset_type ("auto") is used. However, it fails with an ImportError.
Probably why the example in the first notebook in the dbt fundamentals course explicitly sets the value of this param to "default"?
---------------------------------------------------------------------------ModuleNotFoundErrorTraceback (mostrecentcalllast)
[/usr/local/lib/python3.10/dist-packages/ibis/__init__.py](https://localhost:8080/#) in load_backend(name)81try:
--->82module=entry_point.load()
83exceptImportErrorasexc:
16frames
[/usr/local/lib/python3.10/dist-packages/importlib_metadata/__init__.py](https://localhost:8080/#) in load(self)188match=cast(Match, self.pattern.match(self.value))
-->189module=import_module(match.group('module'))
190attrs=filter(None, (match.group('attr') or'').split('.'))
[/usr/lib/python3.10/importlib/__init__.py](https://localhost:8080/#) in import_module(name, package)125level+=1-->126return_bootstrap._gcd_import(name[level:], package, level)
127/usr/lib/python3.10/importlib/_bootstrap.pyin_gcd_import(name, package, level)
/usr/lib/python3.10/importlib/_bootstrap.pyin_find_and_load(name, import_)
/usr/lib/python3.10/importlib/_bootstrap.pyin_find_and_load_unlocked(name, import_)
/usr/lib/python3.10/importlib/_bootstrap.pyin_load_unlocked(spec)
/usr/lib/python3.10/importlib/_bootstrap_external.pyinexec_module(self, module)
/usr/lib/python3.10/importlib/_bootstrap.pyin_call_with_frames_removed(f, *args, **kwds)
[/usr/local/lib/python3.10/dist-packages/ibis/backends/duckdb/__init__.py](https://localhost:8080/#) in <module>15importpyarrowaspa--->16importpyarrow_hotfix# noqa: F40117importsqlglotassgModuleNotFoundError: Nomodulenamed'pyarrow_hotfix'Theaboveexceptionwasthedirectcauseofthefollowingexception:
ImportErrorTraceback (mostrecentcalllast)
[<ipython-input-33-bbd954019e52>](https://localhost:8080/#) in <cell line: 2>()1dataset=pipeline.dataset()
---->2df=dataset.pokemon.df()
3n_cols=len(df.columns)
4# This throws a random error due to some bug in dlt. Looks like the random5# `dataset_type` param of the `dataset()` method must be used for things to work.
[/usr/local/lib/python3.10/dist-packages/dlt/destinations/dataset/relation.py](https://localhost:8080/#) in _wrap(*args, **kwargs)8384def_wrap(*args: Any, **kwargs: Any) ->Any:
--->85withself.cursor() ascursor:
86returngetattr(cursor, func_name)(*args, **kwargs)
87
[/usr/lib/python3.10/contextlib.py](https://localhost:8080/#) in __enter__(self)133delself.args, self.kwds, self.func134try:
-->135returnnext(self.gen)
136exceptStopIteration:
137raiseRuntimeError("generator didn't yield") fromNone
[/usr/local/lib/python3.10/dist-packages/dlt/destinations/dataset/relation.py](https://localhost:8080/#) in cursor(self)65ifhasattr(self.sql_client, "_conn") andhasattr(self.sql_client._conn, "autocommit"):
66self.sql_client._conn.autocommit=False--->67withclient.execute_query(self.query) ascursor:
68ifcolumns_schema:=self.columns_schema:
69cursor.columns_schema=columns_schema
[/usr/local/lib/python3.10/dist-packages/dlt/destinations/dataset/ibis_relation.py](https://localhost:8080/#) in query(self)72# render sql directly if possible73iftarget_dialectnotinTRANSPILE_VIA_MAP:
--->74returnibis.to_sql(self._ibis_object, dialect=target_dialect)
7576# here we need to transpile first
[/usr/local/lib/python3.10/dist-packages/ibis/expr/sql.py](https://localhost:8080/#) in to_sql(expr, dialect, pretty, **kwargs)377else:
378try:
-->379backend=getattr(ibis, dialect)
380exceptAttributeError:
381raiseValueError(f"Unknown dialect {dialect}")
[/usr/local/lib/python3.10/dist-packages/ibis/__init__.py](https://localhost:8080/#) in __getattr__(name)141returnnull() # noqa: F405142else:
-->143returnload_backend(name)
[/usr/local/lib/python3.10/dist-packages/ibis/__init__.py](https://localhost:8080/#) in load_backend(name)82module=entry_point.load()
83exceptImportErrorasexc:
--->84raiseImportError(
85f"Failed to import the {name} backend due to missing dependencies.\n\n"86f"You can pip or conda install the {name} backend as follows:\n\n"ImportError: Failedtoimporttheduckdbbackendduetomissingdependencies.
Youcanpiporcondainstalltheduckdbbackendasfollows:
python-mpipinstall-U"ibis-framework[duckdb]"# pip installcondainstall-cconda-forgeibis-duckdb# or conda install---------------------------------------------------------------------------NOTE: Ifyourimportisfailingduetoamissingpackage, youcanmanuallyinstalldependenciesusingeither !pipor !apt.
Toviewexamplesofinstallingsomecommondependencies, clickthe"Open Examples"buttonbelow.
---------------------------------------------------------------------------
The text was updated successfully, but these errors were encountered:
dlt version
1.5.0
Describe the problem
According to the docstring, the method should fall back to a dbapi interface if the default value of
dataset_type
("auto"
) is used. However, it fails with anImportError
.Probably why the example in the first notebook in the dbt fundamentals course explicitly sets the value of this param to
"default"
?Expected behavior
No response
Steps to reproduce
Operating system
Linux
Runtime environment
Google Colab
Python version
3.11
dlt data source
No response
dlt destination
No response
Other deployment details
No response
Additional information
The text was updated successfully, but these errors were encountered: