From the course: Complete Guide to Databricks for Data Engineering
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
dbutils notebook - Databricks Tutorial
From the course: Complete Guide to Databricks for Data Engineering
dbutils notebook
- [Instructor] Dbutils notebook is an another utility which can help you to play around with this notebook. For example, let's say I have a one notebook. Let me create a new notebook. I call this notebook as a Child_notebook. (keyboard clacking) Now what I'm going to do is I'm going to write a simple DataFrame read thing here. Say spark.read.csv, and then I'm going to give my path that is FileStore/tables/customer.csv And I just said one more thing that header=True. Now the whole intention of this notebook is to do something in this notebook, and rather than executing this notebook directly, I will have a parent notebook and from there, I will call this notebook. Okay, so let's just create a small thing here. Let's say for example, I would say count = df.count. Now this will give me the total count, and what I'll do is I will say here dbutils.notebook.exit. And when I am exiting, I am saying that just pass this count. Okay. Great, so we have read a file, we have converted into the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.