<?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: Trigger.AvailableNow on scala - compile issue in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25319#M17592</link>
    <description>&lt;P&gt;Many things don't work in an IDE such as dbutils and some delta lake features.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We don't release the source code as jars because if we did that AWS would package it and sell it.  &lt;/P&gt;</description>
    <pubDate>Thu, 17 Mar 2022 20:25:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-03-17T20:25:45Z</dc:date>
    <item>
      <title>Trigger.AvailableNow on scala - compile issue</title>
      <link>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25315#M17588</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trigger.AvailableNow is released within the databricks 10.1 runtime and we would like to use this new feature with autoloader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We write all our data pipeline in scala and our projects import spark as a provided dependency. If we try to switch to the 3.2.0 spark version (which databricks 10.1  is based on), we cannot compile our code since Trigger.AvailableOnce is not in this release (at least for the spark open source version). Looking into the github repository seems like this functionality will be released with spark 3.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we have to wait until the spark 3.3 release?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 14:55:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25315#M17588</guid>
      <dc:creator>emanuele_maffeo</dc:creator>
      <dc:date>2022-03-17T14:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger.AvailableNow on scala - compile issue</title>
      <link>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25316#M17589</link>
      <description>&lt;P&gt;You can switch to python.  Depending on what you're doing and if you're using UDFs, there shouldn't be any difference at all in terms of performance.  &lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 18:53:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25316#M17589</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-17T18:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger.AvailableNow on scala - compile issue</title>
      <link>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25317#M17590</link>
      <description>&lt;P&gt;Also, it does look like it's available in scala in 10.1 from the release notes&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/release-notes/runtime/10.1.html#triggeravailablenow-for-delta-source-streaming-queries" target="test_blank"&gt;https://docs.databricks.com/release-notes/runtime/10.1.html#triggeravailablenow-for-delta-source-streaming-queries&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 18:56:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25317#M17590</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-17T18:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger.AvailableNow on scala - compile issue</title>
      <link>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25318#M17591</link>
      <description>&lt;P&gt;Yes, it's available in scala, if I use a scala notebook. But what if I develop my code on a IDE and deploy it to databricks using CD pipelines? is there any chance to have the databricks runtime packaged as jar so that I can use it as a sbt dependency?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 20:10:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25318#M17591</guid>
      <dc:creator>emanuele_maffeo</dc:creator>
      <dc:date>2022-03-17T20:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger.AvailableNow on scala - compile issue</title>
      <link>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25319#M17592</link>
      <description>&lt;P&gt;Many things don't work in an IDE such as dbutils and some delta lake features.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We don't release the source code as jars because if we did that AWS would package it and sell it.  &lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 20:25:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25319#M17592</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-17T20:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger.AvailableNow on scala - compile issue</title>
      <link>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25320#M17593</link>
      <description>&lt;P&gt;That's fair. &lt;/P&gt;&lt;P&gt;Anyway this feature is basically backported from spark 3.3.0, but since spark 3.3.0 has not been released yet I cannot use it because my code won't compile, hence my whole development process won't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the meantime I've found a ugly hack (using reflection) that allow me to avoid this issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;val clazz   = Class.forName("org.apache.spark.sql.streaming.Trigger")
    val method  = clazz.getMethod("AvailableNow")
    val trigger = method.invoke(null).asInstanceOf[Trigger]
&amp;nbsp;
    val streamWriter = df.writeStream
      .format("delta")
      .options(config.sparkWriteOptions)
      .trigger(trigger)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Anyway I guess that this is something that needs to be addressed somehow, in the future there may be other backported features where this workaround won't work.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 20:36:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/trigger-availablenow-on-scala-compile-issue/m-p/25320#M17593</guid>
      <dc:creator>emanuele_maffeo</dc:creator>
      <dc:date>2022-03-17T20:36:36Z</dc:date>
    </item>
  </channel>
</rss>

