Running Linux Commands on Azure Databricks (Using PySpark)

Welcome back ! Today, we will explore the Databricks File Store, and techniques of performing certain operations on it. By the end of this tutorial, you will learn how to:

- Implement Linux commands on Azure Dataricks
- Use Databricks Utilities
- Control the Azure Blob storage from Databricks notebook

Databricks Utilities (DBUtils) provide a way for us to access storage objects and work with them. There are certain specific commands of DBUtils, called File system utilities, which specifically help us deal with the Databricks File System, thus enabling us to use Databricks as a File System.

Let us take an example. Let's say that we want to move a file from one location to another. The command below would help us do just that !
You can explore more commands by the following line:
But, caution ! These scripts are no less risky than running Linux commands (without fully understanding their method of use). Hence, please be careful and review these commands before firing them.

Documentation Link: https://docs.azuredatabricks.net/dev-tools/databricks-utils.html

Comments

Popular posts from this blog

Reading & Writing a file from / to Azure Blob Storage (Using PySpark)

Why PySpark is so Awesome !

Column Pivot in PySpark