6 hours ago - last edited 6 hours ago
Hi Community,
Iโve encountered an issue with the Databricks Extension for VS Code that seems to contradict the documentation. According to the Databricks documentation, the extension supports magic commands like %sql when used with Databricks Connect:
However, in practice, this functionality doesnโt appear to work as expected.
Hereโs an example of the code I ran:
# Databricks notebook source
df = spark.sql("SELECT 1 AS from__python_cell")
df.show()
# COMMAND ----------
# MAGIC %sql
# MAGIC SELECT 1 AS from_sql_cell
The first Python cell executes correctly, displaying the expected result. However, the %sql magic command produces an error:
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1734690770.134581 5908 init.cc:229] grpc_wait_for_shutdown_with_timeout() timed out.
This raises several questions:
My setup includes:
5 hours ago
According to the documentation, the Databricks extension for Visual Studio Code supports the %sql magic command.
However, there are limitations to this support:
Given your setup (Databricks Connect: 13.3.2, Databricks Runtime: 16.0, Databricks Extension for VS Code: v2.5.0), it appears that the %sql magic command should be supported.
Do you have option to open support case so this can be reviewed further and possibly engage engineering if a bug is detected?
5 hours ago
Hi @Walter_C ,
Thanks for the answer!
Just to update you I have also adjusted the versions so that all versions match:
The extensions shows everything as green:
The error is still the same:
I am not able to submit the case or at least I am not sure how to do it considering I am using my private Azure Databricks and private e-mail.
Help centre message:
3 hours ago
Got it, I will check with my internal team to validate if there is any issue around.
3 hours ago - last edited 3 hours ago
Thanks! I appreciate your help
2 hours ago
I got response from engineering:
grpc_wait_for_shutdown_with_timeout
is actually unrelated. We have an issue open for that, but haven't yet deployed a fix, but this issue should not prevent the execution of sql magic thoughJoin a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group