Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions Example Notebook.py

This file was deleted.

20 changes: 20 additions & 0 deletions My Notebook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Databricks notebook source
# MAGIC %md
# MAGIC ### This is an example
# MAGIC This notebook creates a dataframe with some sample data that can be used for a quick visualization.

# COMMAND ----------

data = [[1, "Elia"], [2, "Teo"], [3, "Fang"], [4, "Alladio"]]
sdf = spark.createDataFrame(data, schema="id LONG, name STRING")
display(sdf)

# COMMAND ----------

# MAGIC %sql
# MAGIC CREATE TABLE IF NOT EXISTS customers_bronze;
# MAGIC COPY INTO customers_bronze
# MAGIC FROM 'dbfs:/mnt/dbacademy-datasets/get-started-with-data-engineering-on-databricks/v01/'
# MAGIC FILEFORMAT = CSV
# MAGIC FORMAT_OPTIONS ('inferSchema' = 'true', 'header' = 'true')
# MAGIC COPY_OPTIONS ('mergeSchema' = 'true')