Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
get storage uri from az cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Heisterkamp committed Nov 9, 2022
1 parent fc70678 commit 81881e4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/deploy/steps/91-Create-SparkConf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ $confDirectAccess["spark.databricks.delta.preview.enabled"] = $true
$confDirectAccess["spark.databricks.io.cache.enabled"] = $true
$confDirectAccess["spark.master"]= "local[*, 4]"

Write-Host " Adds Direct Access for $resourceName..." -ForegroundColor DarkYellow
$storageUrl = "$resourceName.dfs.core.windows.net"

$url = az storage account show --name $dataLakeName --resource-group $resourceGroupName --query "primaryEndpoints.dfs" --out tsv

$storageUrl = ([System.Uri]$url).Host

Write-Host " Adds Direct Access for $storageUrl..." -ForegroundColor DarkYellow

$confDirectAccess["fs.azure.account.auth.type.$storageUrl"] = "OAuth"
$confDirectAccess["fs.azure.account.oauth.provider.type.$storageUrl"] = "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider"
$confDirectAccess["fs.azure.account.oauth2.client.id.$storageUrl"] = "{{secrets/secrets/DatabricksClientId}}"
Expand Down

0 comments on commit 81881e4

Please sign in to comment.