Loading tutorials
spark object that every Databricks notebook provides, what it does, and the mistakes people make with it. It assumes you can write basic Python or SQL, understand tabular data (rows, columns, types), and can attach a notebook to compute in a Databricks workspace.5 min readdisplay, show, printSchema, and a few related calls. It assumes you can attach a notebook to compute, know basic Python or SQL, and understand rows, columns, and types. Lazy evaluation gets its own chapter. Here you 4 min readspark is already defined, and you have built a small DataFrame like the orders example from the earlier chapters. It explains why some lines of code finish instantly while others start a job, and how to reason about 5 min readspark is already defined, and you know what a schema is (covered in the previous chapter). Examples use Python.4 min readspark.createDataFrame and printSchema. You should be comfortable with basic Python and with SQL expressions such as CASE WHEN.4 min readspark is already defined, and have met F.col and the built-in functions in pyspark.sql.functions. You should also know that DataFrames are lazy. Here you will pick columns with select, keep rows with filter, and le4 min readselect and filter. It also assumes you know that transformations are lazy, so nothing runs unt4 min readselect, filter and withColumn, and run groupBy aggregations in a Databricks notebook. Real data often has missing values and repeated rows. Spark handles both in ways that can surprise you, so this chapter covers how to detect them, 4 min readwithColumn. It also assumes you know that transformations are lazy and actions run them. Here you will summarize rows with groupBy and agg, and learn how nulls and shuffles affect the resul5 min readjoin works, which join types exist, and the errors that most often surprise people.4 min readselect, withColumn and filter, and run a groupBy aggregation. It also assumes you know the orders DataFrame from the earlier chapters, with columns order_id, customer, `5 min readspark session and the difference between transformations and actions. Both interfaces use the same engine, so you can pick SQL or DataFrame code for each step of a notebook.4 min readselect, filter and groupBy, and that you know the difference between a transformation and an action. It also assumes you have a catalog and schema where you can cr4 min readshow() or count() in a Databricks notebook. It also assumes you know that transformations are lazy. You will learn to read the output of explain(), spot shuffles, and decide when cache() helps.5 min read