Search code examples
apache-sparkdatabrickscluster-computingmagic-command

How to allow %run magic command in Azure Databricks cluster?


I am currently trying to work through a Databricks course and am getting the following error stating that "Your administrator has only allowed sql and python commands on this cluster. This execution contained at least one disallowed language." I am trying to use the %run command.

I have tried googling and cannot find an answer for this anywhere. For similar problems the solution was going to the cluster > advanced settings >spark tab > and pasting this line "spark.databricks.conda.condaMagic.enabled true". I did not know what type of command %run was but I figure it was worth a shot. It did not work and now I am here.

How do I fix this?


Solution

  • I solved my own question lol. Some of the files that the %run command was trying to run contained scala. I had to change my cluster permissions to allow scala