Azure Databricks: make the parameters dynamic in dbutils.fs.mount

Alexis Kan 21 Reputation points
2022-12-05T09:41:19.96+00:00

Hi, is it possible to make the parameter <storage-account-name> in dbutils.fs.mount() dynamic? The <storage-account-name> is different between different environment so it would be good to make this parameter dynamic.
267202-image.png

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,514 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2022-12-06T08:47:26.293+00:00

    Hi @Alexis Kan ,

    Thank you for posting query in Microsoft Q&A Platform.

    Yes you can create a parameter in notebook to take storage account name dynamically and create a mount point from it. Please check below screenshot.

    267692-image.png

    Check below video to know about creating parameters in azure databricks notebook.
    Widgets utility(dbutils.widgets) of Databricks Utilities in Azure Databricks | Create parameters in notebook

    Check below video to pass values to notebook parameters from another notebook.
    Pass values to notebook parameters from another notebook using run command in Azure Databricks

    Hope this helps. Please let me know if any further queries.

    --------------------

    Please consider hitting Accept Answer button. Accepted answers help community as well.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.