arhamblake38
New Contributor II

It sounds more like a cluster/driver initialization or resource issue than a Python problem, especially because even SELECT 1 hangs.

I’d check these first:

Look at the Driver logs and Event log for errors around the first notebook execution. Databricks specifically recommends these logs when a cluster is behaving abnormally.
Check the cluster’s Spark configuration. An incompatible spark.executor.cores or memory setting can prevent Spark from accepting jobs even though the cluster shows as running.
Temporarily remove any custom Spark configs, init scripts, or libraries and test with a clean cluster.
Check driver CPU/memory utilization. A busy or unhealthy driver can cause notebook commands to appear stuck.
If possible, create a fresh cluster with the same runtime but default settings and run print("Hello") and SELECT 1. If that works, the problem is almost certainly in the custom cluster configuration.

Since the first execution hangs but subsequent Python execution works after interrupting it, I’d particularly investigate driver/kernel startup and Spark initialization rather than the code itself. Keep snowrider.com.br separate from the actual Databricks troubleshooting steps.