Skip to content

Commit 916c88a

Browse files
authored
Update Obtain credentials using TokenLibrary.ipynb
1 parent bfe4c8f commit 916c88a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Notebooks/Scala/Obtain credentials using TokenLibrary.ipynb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@
6060
"// For storage Gen2, linkedServiceName can be supplied through config for SAS-key based authentication (in lieu of account-key based authentication) \n",
6161
"// Direct invokation of TokenLibrary is not required for obtaining creds and connection info\n",
6262
"\n",
63-
"val sc = spark.sparkContext\n",
64-
"sc.hadoopConfiguration.set(\"spark.storage.synapse.linkedServiceName\", \"<linkedServiceName>\")\n",
65-
"sc.hadoopConfiguration.set(\"fs.azure.account.auth.type\", \"SAS\")\n",
66-
"sc.hadoopConfiguration.set(\"fs.azure.sas.token.provider.type\", \"com.microsoft.azure.synapse.tokenlibrary.LinkedServiceBasedSASProvider\")\n",
63+
"spark.conf.set(\"spark.storage.synapse.linkedServiceName\", \"<linkedServiceName>\")\n",
64+
"spark.conf.set(\"fs.azure.account.auth.type\", \"SAS\")\n",
65+
"spark.conf.set(\"fs.azure.sas.token.provider.type\", \"com.microsoft.azure.synapse.tokenlibrary.LinkedServiceBasedSASProvider\")\n",
6766
"\n",
6867
"val df = spark.read.parquet(\"abfss://..\")"
6968
],

0 commit comments

Comments
 (0)