You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Databricks CLI导出文件报错:需对象或目录绝对路径

解决Databricks CLI导出文件路径错误问题
  • 问题根源:databricks workspace export命令要求本地目标路径必须是绝对路径,你使用的/targetpath/test.md如果不是系统根目录下的完整绝对路径(比如Linux的/home/xxx/targetpath/test.md或Windows的C:\targetpath\test.md),就会触发该错误。

  • 修复步骤:

    1. 先确保本地目标目录已存在,不存在则创建:
      # Linux/macOS
      mkdir -p /home/your-username/targetpath
      # Windows PowerShell
      New-Item -ItemType Directory -Path C:\targetpath
      
    2. 使用绝对路径重新执行导出命令:
      # Linux/macOS示例
      databricks workspace export /mypath/test.md /home/your-username/targetpath/test.md
      # Windows示例
      databricks workspace export /mypath/test.md C:\targetpath\test.md
      
  • 便捷写法:如果不想手动输入完整绝对路径,可借助系统变量引用当前工作目录:

    # Linux/macOS
    databricks workspace export /mypath/test.md $PWD/targetpath/test.md
    # Windows PowerShell
    databricks workspace export /mypath/test.md "$($pwd.Path)\targetpath\test.md"
    

内容的提问来源于stack exchange,提问作者geotheory

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 20:24:49