cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Databricks Workspace import api size limitation

pavansharma36
New Contributor III

As libraries from dbfs is deprecated and support is going to be removed. We are moving libs from dbfs to workspace files.

But while uploading libraries using https://docs.databricks.com/api/azure/workspace/workspace/import api there seems to be limit on size of content which is 10mb. When I try from UI to upload lib I can upload with size more than 10mb but not from api.

Not able to find any other way to upload files using api, can anyone share details how to get this done with api.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Giri-Patcham
Databricks Employee
Databricks Employee
5 REPLIES 5

Giri-Patcham
Databricks Employee
Databricks Employee

@pavansharma36  You can try volumes and use Files API to upload 
https://docs.databricks.com/api/azure/workspace/files

PUT <DATABRICKS_HOST>/api/2.0/fs/directories?directory_path=/Workspace/Shared/iw_cgu1prrv/test

gives 

 

{
    "error_code": "BAD_REQUEST",
    "message": "Invalid path:",
    "details": [
        {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "FILES_API_INVALID_PATH",
            "domain": "filesystem.databricks.com",
            "metadata": {
                "validation_error": ""
            }
        }
    ]
}

 

Tried multiple values

eg. /Volumes/samples/default/test

@pavansharma36 Try something like this 

PUT <DATABRICKS_HOST>/api/2.0/fs/directories/Volumes/samples/default/test

pavansharma36
New Contributor III

Looks like volumes not supported for Standard tier.

{
    "error_code": "BAD_REQUEST",
    "message": "Unity Catalog is not available for feature tier STANDARD_TIER.",
    "details": [
        {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "FILES_API_MANAGED_CATALOG_FEATURE_DISABLED",
            "domain": "filesystem.databricks.com",
            "metadata": {
                "unity_catalog_error_message": "Unity Catalog is not available for feature tier STANDARD_TIER."
            }
        }
    ]
}

Not able to create Workspace directories from files api

Whats point of exposing files api onto standard tier when its not usable.

NaraKris_40883
New Contributor II

Can we use this API to upload files to /workspace/ location? Any sample curl request ? I am using 

-X PUT https://<HOST_NAME>/api/2.0/fs/files/Workspace/Shared/jars/all.jar and getting 

{

  "error_code" : "BAD_REQUEST",

  "message" : "Invalid path:",

  "details" : [ {

    "@type" : "type.googleapis.com/google.rpc.ErrorInfo",

    "reason" : "FILES_API_INVALID_PATH",

    "domain" : "filesystem.databricks.com",

    "metadata" : {

      "validation_error" : ""

    }

  } ]

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group