filipniziol
Esteemed Contributor

Hi @Walter_C ,

My setup is as follows:

  1. Python 3.11.9
  2. Databricks Runtime: 15.4
  3. Databricks Connect: 15.4.4

I have modified a cell as follows (python cell, then SQL cell, then python cell):

# Databricks notebook source

df = spark.sql("SELECT 1 AS from__python_cell")
df.show()

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

# MAGIC %sql
# MAGIC SELECT 2 AS from_sql_cell

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

df = spark.sql("SELECT 3 AS from__python_cell")
df.show()

The output (the error disappeared, but nothing is displayed from SELECT from SQL):

filipniziol_0-1735392387171.png

I wonder whether the SQL was executed but simply nothing was displayed or nothing was executed.
If it is executed, do you have an idea how to display the output of the SQL statement in %sql magic command?