<?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 Error with mosaic.enable_mosaic() when created DLT Pipeline with Mosaic lib in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/error-with-mosaic-enable-mosaic-when-created-dlt-pipeline-with/m-p/63021#M32150</link>
    <description>&lt;P&gt;The error was raised when I tried to start a DLT pipeline with simple code, just to start experimenting the DLT.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The primary library was Mosaic, which is already instructed to installed first before importing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is roughly as follow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;$ %pip install databricks-mosaic

import mosaic as mos
mos.enable_mosaic(spark, dbutils) # Error line 
import dlt
from pyspark.sql.functions import *
from pyspark.sql.types import *

@dlt.table(comment="Testing a DLT table for geospatial coverage")
def geo_area():
    return spark.read.table("geo_coverage_area")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the DLT Pipeline setting JSON&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
"id": "&amp;lt;&amp;gt;",
"pipeline_type": "WORKSPACE",
"clusters": [
{
"label": "default",
"node_type_id": "m5d.large",
"driver_node_type_id": "m5d.large",
"custom_tags": {
"type": "test"
},
"num_workers": 1
},
{
"label": "maintenance",
"custom_tags": {
"type": "test"
}
}
],
"development": true,
"continuous": false,
"channel": "CURRENT",
"photon": false,
"libraries": [
{
"notebook": {
"path": "/&amp;lt;&amp;gt;/test DLT"
}
}
],
"name": "helloCellCoverage",
"edition": "CORE",
"catalog": "sigint_workspace",
"target": "default",
"data_sampling": false
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the error raised&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;java.lang.RuntimeException: Failed to execute python command for notebook "&amp;lt;Removed&amp;gt;" and error AnsiResult(---------------------------------------------------------------------------
Py4JError                                 Traceback (most recent call last)
File &amp;lt;command--1&amp;gt;:3
      1 import mosaic as mos
----&amp;gt; 3 mos.enable_mosaic(spark, dbutils)
      5 import dlt
      6 # import pyspark.sql.functions as &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2024 10:24:27 GMT</pubDate>
    <dc:creator>slothPetete</dc:creator>
    <dc:date>2024-03-08T10:24:27Z</dc:date>
    <item>
      <title>Error with mosaic.enable_mosaic() when created DLT Pipeline with Mosaic lib</title>
      <link>https://community.databricks.com/t5/data-engineering/error-with-mosaic-enable-mosaic-when-created-dlt-pipeline-with/m-p/63021#M32150</link>
      <description>&lt;P&gt;The error was raised when I tried to start a DLT pipeline with simple code, just to start experimenting the DLT.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The primary library was Mosaic, which is already instructed to installed first before importing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is roughly as follow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;$ %pip install databricks-mosaic

import mosaic as mos
mos.enable_mosaic(spark, dbutils) # Error line 
import dlt
from pyspark.sql.functions import *
from pyspark.sql.types import *

@dlt.table(comment="Testing a DLT table for geospatial coverage")
def geo_area():
    return spark.read.table("geo_coverage_area")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the DLT Pipeline setting JSON&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
"id": "&amp;lt;&amp;gt;",
"pipeline_type": "WORKSPACE",
"clusters": [
{
"label": "default",
"node_type_id": "m5d.large",
"driver_node_type_id": "m5d.large",
"custom_tags": {
"type": "test"
},
"num_workers": 1
},
{
"label": "maintenance",
"custom_tags": {
"type": "test"
}
}
],
"development": true,
"continuous": false,
"channel": "CURRENT",
"photon": false,
"libraries": [
{
"notebook": {
"path": "/&amp;lt;&amp;gt;/test DLT"
}
}
],
"name": "helloCellCoverage",
"edition": "CORE",
"catalog": "sigint_workspace",
"target": "default",
"data_sampling": false
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the error raised&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;java.lang.RuntimeException: Failed to execute python command for notebook "&amp;lt;Removed&amp;gt;" and error AnsiResult(---------------------------------------------------------------------------
Py4JError                                 Traceback (most recent call last)
File &amp;lt;command--1&amp;gt;:3
      1 import mosaic as mos
----&amp;gt; 3 mos.enable_mosaic(spark, dbutils)
      5 import dlt
      6 # import pyspark.sql.functions as &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 10:24:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-with-mosaic-enable-mosaic-when-created-dlt-pipeline-with/m-p/63021#M32150</guid>
      <dc:creator>slothPetete</dc:creator>
      <dc:date>2024-03-08T10:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error with mosaic.enable_mosaic() when created DLT Pipeline with Mosaic lib</title>
      <link>https://community.databricks.com/t5/data-engineering/error-with-mosaic-enable-mosaic-when-created-dlt-pipeline-with/m-p/63209#M32192</link>
      <description>&lt;P&gt;Hi, thank you for the reply. However, I couldn't related the OAuth issue to the Java RunTime error from my question. Additionally, I tried checked the Photon feature when started the workflow, and the error still persists.&lt;/P&gt;&lt;P&gt;Thank you for your response anyway.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 04:50:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/error-with-mosaic-enable-mosaic-when-created-dlt-pipeline-with/m-p/63209#M32192</guid>
      <dc:creator>slothPetete</dc:creator>
      <dc:date>2024-03-11T04:50:49Z</dc:date>
    </item>
  </channel>
</rss>

