Skip to content
Advertisement

Uploading files from Azure Blob Storage to SFTP location using Databricks?

I have a scenario where I need to copy files from Azure Blob Storage to SFTP location in Databricks

Is there a way to achieve this scenario using pySpark or Scala?

Advertisement

Answer

Regarding the issue, please refer to the following steps (I use scala)

  1. Mount Azure Blob storage containers to DBFS
JavaScript

enter image description here

  1. Copy these file to clusters local file system
JavaScript

enter image description here

  1. Code. Before running the code, please add librarycom.jcraft.jsch vai Maven in databricks
JavaScript

enter image description here

  1. Check with FileZilla

#Update

After we mount Azure blob, we can directly access file and upload it.

For example

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement