<?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: Unity Catalog - Writing to PNG Files to Cluster and then using dbutils.fs.cp to send to Azure AD in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/unity-catalog-writing-to-png-files-to-cluster-and-then-using/m-p/45605#M27947</link>
    <description>&lt;P&gt;Hmm I read something different - someone else had this error because they used a shared cluster - apparently it does not happen on a single user cluster. All those settings are already done and I am a fully admin.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2023 02:51:32 GMT</pubDate>
    <dc:creator>aicd_de</dc:creator>
    <dc:date>2023-09-22T02:51:32Z</dc:date>
    <item>
      <title>Unity Catalog - Writing to PNG Files to Cluster and then using dbutils.fs.cp to send to Azure ADLS2</title>
      <link>https://community.databricks.com/t5/data-engineering/unity-catalog-writing-to-png-files-to-cluster-and-then-using/m-p/45390#M27863</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;Looking to get some help. We are on Unity Catalog in Azure. We have a requirement to use Python to write out PNG files (several) via Matplotlib and then drop those into an ADLS2 Bucket. With Unity Catalog, we can easily use dbutils.fs.cp or fs.put to do this. However, the PNGs need to be written to the Cluster first before we use Copy to move them over to an ADLS2 Bucket.&lt;/P&gt;&lt;P&gt;The issue: dbutils cannot access all locations on the Cluster and the folders it can access we get ERROR 13 Access Denied when trying to write PNGs to those spots. So I am not sure where i can drop the files to do the copy with. Here is the code snippet:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;CODE HERE TO GENERATE CHART&amp;gt;... FOLLOWED BY..&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; img_name = &lt;/SPAN&gt;&lt;SPAN&gt;f'&lt;/SPAN&gt;&lt;SPAN&gt;{product_level_1}&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;{product_level_2}&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;{product_level_3}&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;{value_type_1}&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;{value_type_2}&lt;/SPAN&gt;&lt;SPAN&gt;.png'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;plt.savefig('/databricks-datasets/'+img_name, bbox_inches='tight', format='png')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;dbutils.fs.cp('/databricks-datasets/'+img_name, storage_url+img_name)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(img_name)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So, the plt.save if I just go img_name, it drops to default workspace location but then dbutils cannot locate it. Then when I try to select folders dbutils can have it doesn't work with permission issues.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Sep 2023 00:01:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unity-catalog-writing-to-png-files-to-cluster-and-then-using/m-p/45390#M27863</guid>
      <dc:creator>aicd_de</dc:creator>
      <dc:date>2023-09-20T00:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unity Catalog - Writing to PNG Files to Cluster and then using dbutils.fs.cp to send to Azure AD</title>
      <link>https://community.databricks.com/t5/data-engineering/unity-catalog-writing-to-png-files-to-cluster-and-then-using/m-p/45471#M27890</link>
      <description>&lt;P&gt;I get this error writing to that location:&lt;BR /&gt;&lt;BR /&gt;"&lt;SPAN&gt;java.lang.SecurityException: Cannot use com.databricks.backend.daemon.driver.WorkspaceLocalFileSystem - local filesystem access is forbidden"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 00:20:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unity-catalog-writing-to-png-files-to-cluster-and-then-using/m-p/45471#M27890</guid>
      <dc:creator>aicd_de</dc:creator>
      <dc:date>2023-09-21T00:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Unity Catalog - Writing to PNG Files to Cluster and then using dbutils.fs.cp to send to Azure AD</title>
      <link>https://community.databricks.com/t5/data-engineering/unity-catalog-writing-to-png-files-to-cluster-and-then-using/m-p/45605#M27947</link>
      <description>&lt;P&gt;Hmm I read something different - someone else had this error because they used a shared cluster - apparently it does not happen on a single user cluster. All those settings are already done and I am a fully admin.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 02:51:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unity-catalog-writing-to-png-files-to-cluster-and-then-using/m-p/45605#M27947</guid>
      <dc:creator>aicd_de</dc:creator>
      <dc:date>2023-09-22T02:51:32Z</dc:date>
    </item>
  </channel>
</rss>

