<?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 Re: how to create a scala jar using db notebook and save it in a file path inside databricks in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-create-a-scala-jar-using-db-notebook-and-save-it-in-a/m-p/4544#M1236</link>
    <description>&lt;P&gt;I had to finally create the jar using teh intellij and sbt iconfiguration on the same env. and then installed the jar in the cluster it worked&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 May 2023 10:50:49 GMT</pubDate>
    <dc:creator>swatish0395</dc:creator>
    <dc:date>2023-05-23T10:50:49Z</dc:date>
    <item>
      <title>how to create a scala jar using db notebook and save it in a file path inside databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-create-a-scala-jar-using-db-notebook-and-save-it-in-a/m-p/4541#M1233</link>
      <description>&lt;P&gt;I have scala function as below, i am unable to understand how to write a scala jar with the same, &lt;/P&gt;&lt;P&gt;please find below code i have used &lt;A href="https://www.databricks.com/notebooks/enforcing-column-level-encryption.html" alt="https://www.databricks.com/notebooks/enforcing-column-level-encryption.html" target="_blank"&gt;Enforcing Column-Level Encryption - Databrick&lt;/A&gt; &lt;/P&gt;&lt;P&gt;%scala &lt;/P&gt;&lt;P&gt;import com.macasaet.fernet.{Key, StringValidator, Token}&lt;/P&gt;&lt;P&gt;import org.apache.hadoop.hive.ql.exec.UDF;&lt;/P&gt;&lt;P&gt;import java.time.{Duration, Instant};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class Validator extends StringValidator {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;override def getTimeToLive() : java.time.temporal.TemporalAmount = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;Duration.ofSeconds(Instant.MAX.getEpochSecond());&lt;/P&gt;&lt;P&gt;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class udfDecrypt extends UDF {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;def evaluate(inputVal: String, sparkKey : String): String = {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;if( inputVal != null &amp;amp;&amp;amp; inputVal!="" ) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;val keys: Key = new Key(sparkKey)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;val token = Token.fromString(inputVal)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;val validator = new Validator() {}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;val payload = token.validateAndDecrypt(keys, validator)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;payload&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;} else return inputVal&lt;/P&gt;&lt;P&gt;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please tell ema solution to create a jar with the above scala function inside DB notebook&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#Scala​&amp;nbsp;#DBnotebook​&amp;nbsp;#Jars​&amp;nbsp;#[Jar Scala]​&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 09:59:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-create-a-scala-jar-using-db-notebook-and-save-it-in-a/m-p/4541#M1233</guid>
      <dc:creator>swatish0395</dc:creator>
      <dc:date>2023-05-11T09:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a scala jar using db notebook and save it in a file path inside databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-create-a-scala-jar-using-db-notebook-and-save-it-in-a/m-p/4542#M1234</link>
      <description>&lt;P&gt;for a jar you need to build it (using SBT for example).  Notebooks are not able to do that.&lt;/P&gt;&lt;P&gt;I create jars in IntelliJ with SBT.&lt;/P&gt;&lt;P&gt;What you can do is not using a jar at all but use &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/notebooks/package-cells" alt="https://learn.microsoft.com/en-us/azure/databricks/notebooks/package-cells" target="_blank"&gt;package cells&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;However I do not think those are used a lot because a while ago I asked a question on the forum who uses package cells and nobody confirmed they did.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 08:32:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-create-a-scala-jar-using-db-notebook-and-save-it-in-a/m-p/4542#M1234</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2023-05-12T08:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a scala jar using db notebook and save it in a file path inside databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-create-a-scala-jar-using-db-notebook-and-save-it-in-a/m-p/4543#M1235</link>
      <description>&lt;P&gt;Hi @swati sharma​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for posting your question in our community! We are happy to assist you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 06:43:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-create-a-scala-jar-using-db-notebook-and-save-it-in-a/m-p/4543#M1235</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-22T06:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a scala jar using db notebook and save it in a file path inside databricks</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-create-a-scala-jar-using-db-notebook-and-save-it-in-a/m-p/4544#M1236</link>
      <description>&lt;P&gt;I had to finally create the jar using teh intellij and sbt iconfiguration on the same env. and then installed the jar in the cluster it worked&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2023 10:50:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-create-a-scala-jar-using-db-notebook-and-save-it-in-a/m-p/4544#M1236</guid>
      <dc:creator>swatish0395</dc:creator>
      <dc:date>2023-05-23T10:50:49Z</dc:date>
    </item>
  </channel>
</rss>

