AttributeError: module 'pyspark.dbutils' has no attribute 'fs'
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2023 10:50 AM
`AttributeError` when attempting to transfer files from `dbfs` filestore in DataBricks to a local directory.
import pyspark.dbutils as pdbutils
pdbutils.fs.cp("/dbfs/Data/file1.csv", "/Users/Downloads/")
Traceback (most recent call last):
File "/databricks/python/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3378, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<command-1495140876495465>", line 4, in <module>
pdbutils.fs.cp("/dbfs/Usage-Data/df_tx_0106_2022.csv", "/Users/keval/Downloads/")
AttributeError: module 'pyspark.dbutils' has no attribute 'fs'
Labels:
- Labels:
-
Module