<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How can I run a scala command line in databricks? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29375#M21105</link>
    <description>&lt;P&gt;I wish to run a scala command, which I believe would normally be run from a scala command line rather than from within a notebook. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It happens to be:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;scala [-cp scalatest-&amp;lt;version&amp;gt;.jar:...] org.scalatest.tools.Runner [arguments]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(scalatest_2.12__3.0.8.jar is included within the databricks runtime)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be run within a scala notebook from databricks, or by some other means within databricks, eg (and ideally) as a job?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried various ways of running this command from within a notebook without success. I'm not sure if its possible or if I need to structure the syntax in such a way for it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2022 09:39:00 GMT</pubDate>
    <dc:creator>pret</dc:creator>
    <dc:date>2022-10-04T09:39:00Z</dc:date>
    <item>
      <title>How can I run a scala command line in databricks?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29375#M21105</link>
      <description>&lt;P&gt;I wish to run a scala command, which I believe would normally be run from a scala command line rather than from within a notebook. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It happens to be:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;scala [-cp scalatest-&amp;lt;version&amp;gt;.jar:...] org.scalatest.tools.Runner [arguments]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(scalatest_2.12__3.0.8.jar is included within the databricks runtime)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be run within a scala notebook from databricks, or by some other means within databricks, eg (and ideally) as a job?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried various ways of running this command from within a notebook without success. I'm not sure if its possible or if I need to structure the syntax in such a way for it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 09:39:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29375#M21105</guid>
      <dc:creator>pret</dc:creator>
      <dc:date>2022-10-04T09:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run a scala command line in databricks?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29377#M21107</link>
      <description>&lt;P&gt;Hi @Debayan Mukherjee​&amp;nbsp;, thanks, I understand I can write Scala scripts in the notebook, which I already do, but I'm not sure how I can run a scala command line command in databricks?  For example, using a 7.3 LTS runtime and the following scala in a notebook:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;import org.scalatest._
import org.scalatest.tools.Runner
&amp;nbsp;
class DBtestSuite extends FeatureSpec with GivenWhenThen {
&amp;nbsp;
  feature("feature...") {
    scenario("scenario...") {
      Given("given...")
      When("when")
      Then("then...")
      assert(1==2)
    }
  }
}
&amp;nbsp;
scala -classpath "scalatest_2.12__3.0.8.jar" org.scalatest.tools.Runner -s DBtestSuite&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;results in error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;error: ';' expected but string literal found.
scala -classpath "scalatest_2.12__3.0.8.jar" org.scalatest.tools.Runner -s DBtestSuite&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 09:57:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29377#M21107</guid>
      <dc:creator>pret</dc:creator>
      <dc:date>2022-10-06T09:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run a scala command line in databricks?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29379#M21109</link>
      <description>&lt;P&gt;Hi @David Vardy​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or&lt;B&gt; mark an answer as best?&lt;/B&gt; Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 03:49:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29379#M21109</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-03T03:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run a scala command line in databricks?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29376#M21106</link>
      <description>&lt;P&gt;Hi @David Vardy​&amp;nbsp;, from notebooks you can try using Scala, ref: &lt;A href="https://docs.databricks.com/notebooks/notebooks-use.html#mix-languages" alt="https://docs.databricks.com/notebooks/notebooks-use.html#mix-languages" target="_blank"&gt;https://docs.databricks.com/notebooks/notebooks-use.html#mix-languages&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;You can use the language magic command&amp;nbsp;%&amp;lt;language&amp;gt; at the beginning of a cell. The supported magic commands are:&amp;nbsp;&lt;/P&gt;&lt;P&gt;%python&lt;/P&gt;&lt;P&gt;%r&lt;/P&gt;&lt;P&gt;%scala&lt;/P&gt;&lt;P&gt;%sql&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 08:15:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29376#M21106</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2022-10-06T08:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run a scala command line in databricks?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29378#M21108</link>
      <description>&lt;P&gt;@David Vardy​&amp;nbsp;Could you please check if this helps: &lt;/P&gt;&lt;P&gt;&lt;A href="https://databricks-prod-cloudfront.cloud.databricks.com/public/4027ec902e239c93eaaa8714f173bcfc/7658591944105421/3162710545890990/6751888352535706/latest.html" alt="https://databricks-prod-cloudfront.cloud.databricks.com/public/4027ec902e239c93eaaa8714f173bcfc/7658591944105421/3162710545890990/6751888352535706/latest.html" target="_blank"&gt;https://databricks-prod-cloudfront.cloud.databricks.com/public/4027ec902e239c93eaaa8714f173bcfc/7658591944105421/3162710545890990/6751888352535706/latest.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/languages/scala.html" alt="https://docs.databricks.com/languages/scala.html" target="_blank"&gt;https://docs.databricks.com/languages/scala.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the knowledge base: &lt;A href="https://kb.databricks.com/scala/index.html?_ga=2.90545306.1490214985.1664985187-643525343.1663499643" alt="https://kb.databricks.com/scala/index.html?_ga=2.90545306.1490214985.1664985187-643525343.1663499643" target="_blank"&gt;https://kb.databricks.com/scala/index.html?_ga=2.90545306.1490214985.1664985187-643525343.1663499643&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 13:09:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-run-a-scala-command-line-in-databricks/m-p/29378#M21108</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2022-10-06T13:09:17Z</dc:date>
    </item>
  </channel>
</rss>

