Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2024 05:28 AM
Hi @Walter_C ,
My setup is as follows:
- Python 3.11.9
- Databricks Runtime: 15.4
- 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):
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?