How to change databricks location

Venkatesulu Kalla 21 Reputation points
2022-01-11T09:09:10.75+00:00

i want to change the existing location(region) for databricks and along with other apps as well

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,938 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 10,976 Reputation points MVP
    2022-01-11T10:01:09.633+00:00

    Hello @Venkatesulu Kalla

    Unfortunately Move operation is not supported for resource Azure Databricks

    163770-image.png

    https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/move-support-resources#microsoftdatabricks

    However, you can use custom solution to move Azure Databricks to another region.
    Basically there are 5 types of content within a Databricks workspace:

    • Workspace items (notebooks and folders)
    • Clusters
    • Jobs
    • Secrets
    • Security (users and groups)

    For all of them an appropriate REST API is provided by Databricks to manage and also exports and imports.
    You can extend the module and add new Import and Export functions which automatically process all the different content types:

    Export-DatabricksEnvironment  
    Import-DatabricksEnvironment  
    

    They can be further parameterized to only import/export certain artifacts and how to deal with updates to already existing items. The actual output of the export looks like this and you can modify it manually to your needs – all files are in JSON except for the notebooks which are exported as .DBC file by default:

    163830-image.png

    A very simple sample code doing and export and an import into a different environment could look like this:

    Set-DatabricksEnvironment -AccessToken $accessTokenExport -ApiRootUrl "https://westeurope.azuredatabricks.net"  
    Export-DatabricksEnvironment -LocalPath 'D:\Desktop\MyExport' -CleanLocalPath  
      
    Set-DatabricksEnvironment -AccessToken $accessTokenImpport -ApiRootUrl "https://westeurope.azuredatabricks.net"  
    Import-DatabricksEnvironment -LocalPath 'D:\Desktop\MyExport'   
    

    Having those scripts made the whole migration a very easy task.
    https://blog.gbrueckl.at/2019/10/how-to-migrating-databricks-workspaces/

    1 person found this answer helpful.
    0 comments No comments