val input_blob_path = "Enter input azure blob path here"
val output_blob_path = "Enter output azure blob path here"
val storageAccountName = "Enter_Your_Storage_Account_Name"
val storageKeyValue = "Enter_Your_Storage_Account_Key"
val containerName = "Enter_Your_containerName"
val sparkSession = SparkSession.builder()
.master("local")
.appName("WriteDataToAzureBlob")
.config(
s"fs.azure.account.key.${storageAccountName}.blob.core.windows.net",
storageKeyValue)
.getOrCreate()
parqDF.write.parquet("wasbs://${containerName}@{storageAccountName}.blob.core.windows.net/${output_blob_path}")
I am using this code to write in blob storage but it's now working for me.
For the error:
scala module 2.13.2 requires jackson databind version >= 2.12.0 and < 2.13.0 in scala
OR
Try to add a different com.fasterxml.jackson.core dependencies version as per error and then you may need to override them explicitly.
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.12.5"
See 1. scala - Jackson conflicts in Apache Spark when used with Azure Java SDK - Stack Overflow
Other References:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.