Advertisement
Guest User

Untitled

a guest
May 10th, 2019
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.53 KB | None | 0 0
  1. // Databricks notebook source
  2. val containerName = "<container_name>"
  3. val storageAccountName = "<storage_account_name>"
  4. val accessKey = "<access_key>"
  5.  
  6. val url = "wasbs://" + containerName + "@" + storageAccountName + ".blob.core.windows.net/"
  7. var keyUrl = "fs.azure.account.key." + storageAccountName +".blob.core.windows.net"
  8.  
  9. // COMMAND ----------
  10.  
  11. sc.hadoopConfiguration.set(keyUrl, accessKey)
  12.  
  13. // COMMAND ----------
  14.  
  15. dbutils.fs.mount(
  16.   source = url,
  17.   mountPoint = "/mnt/demo",
  18.   extraConfigs = Map(keyUrl -> accessKey))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement