<?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: Saving a file to /tmp is not working after migration to Unity Catalog in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/saving-a-file-to-tmp-is-not-working-after-migration-to-unity/m-p/88776#M37612</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/119255"&gt;@LearnDB123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes, there have been significant changes to the handling of storage locations, including `/tmp/`, when using Unity Catalog in Databricks. Unity Catalog introduces stricter governance and security controls, which affect access to certain storage paths, including temporary directories.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Why You Are Facing Permission Denied Errors with `/tmp/` in Unity Catalog?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Unity Catalog enforces stricter access controls to prevent unauthorized access and ensure data governance. Access to certain locations, such as `/tmp/`, may be restricted by default because they are not managed or governed under Unity Catalog’s data security model. In Databricks with Unity Catalog, the `/tmp/` directory is no longer accessible in the same way as it was in non-UC environments. This is because Unity Catalog governs storage locations more strictly and `/tmp/` is considered outside the managed and secure storage zones defined by Unity Catalog.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Recommended Solutions&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use Managed Storage Locations in Unity Catalog. Instead of using `/tmp/`, you should configure and use Unity Catalog-managed storage locations for temporary file handling. This allows the data to be secured and audited correctly under Unity Catalog’s governance.&lt;/P&gt;&lt;P&gt;Set Up an External Location in Unity Catalog.&amp;nbsp;Create an external location using Unity Catalog, which points to a specific path in your Azure Blob Storage. This location can then be used for temporary data operations and will respect Unity Catalog’s access permissions.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;-- Create an external location in Unity Catalog
CREATE EXTERNAL LOCATION temp_storage
URL 'abfss://&amp;lt;your-container&amp;gt;@&amp;lt;your-storage-account&amp;gt;.dfs.core.windows.net/tmp/'
WITH (STORAGE CREDENTIAL my_storage_credential)
COMMENT 'Temporary storage location for data processing'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 18:05:57 GMT</pubDate>
    <dc:creator>filipniziol</dc:creator>
    <dc:date>2024-09-05T18:05:57Z</dc:date>
    <item>
      <title>Saving a file to /tmp is not working after migration to Unity Catalog</title>
      <link>https://community.databricks.com/t5/data-engineering/saving-a-file-to-tmp-is-not-working-after-migration-to-unity/m-p/88573#M37550</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We upgraded our runtime cluster to Unity Catalog recently and since some of the code has been failing which was working fine earlier.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We used to save files to "/tmp/" and then move them from temp into our blob storage however since the migration to UC this has been failing with an error of Permission Denied.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has there been any changes to the tmp storage location with UC?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 16:14:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/saving-a-file-to-tmp-is-not-working-after-migration-to-unity/m-p/88573#M37550</guid>
      <dc:creator>LearnDB123</dc:creator>
      <dc:date>2024-09-04T16:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Saving a file to /tmp is not working after migration to Unity Catalog</title>
      <link>https://community.databricks.com/t5/data-engineering/saving-a-file-to-tmp-is-not-working-after-migration-to-unity/m-p/88776#M37612</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/119255"&gt;@LearnDB123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes, there have been significant changes to the handling of storage locations, including `/tmp/`, when using Unity Catalog in Databricks. Unity Catalog introduces stricter governance and security controls, which affect access to certain storage paths, including temporary directories.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Why You Are Facing Permission Denied Errors with `/tmp/` in Unity Catalog?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Unity Catalog enforces stricter access controls to prevent unauthorized access and ensure data governance. Access to certain locations, such as `/tmp/`, may be restricted by default because they are not managed or governed under Unity Catalog’s data security model. In Databricks with Unity Catalog, the `/tmp/` directory is no longer accessible in the same way as it was in non-UC environments. This is because Unity Catalog governs storage locations more strictly and `/tmp/` is considered outside the managed and secure storage zones defined by Unity Catalog.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Recommended Solutions&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use Managed Storage Locations in Unity Catalog. Instead of using `/tmp/`, you should configure and use Unity Catalog-managed storage locations for temporary file handling. This allows the data to be secured and audited correctly under Unity Catalog’s governance.&lt;/P&gt;&lt;P&gt;Set Up an External Location in Unity Catalog.&amp;nbsp;Create an external location using Unity Catalog, which points to a specific path in your Azure Blob Storage. This location can then be used for temporary data operations and will respect Unity Catalog’s access permissions.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;-- Create an external location in Unity Catalog
CREATE EXTERNAL LOCATION temp_storage
URL 'abfss://&amp;lt;your-container&amp;gt;@&amp;lt;your-storage-account&amp;gt;.dfs.core.windows.net/tmp/'
WITH (STORAGE CREDENTIAL my_storage_credential)
COMMENT 'Temporary storage location for data processing'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 18:05:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/saving-a-file-to-tmp-is-not-working-after-migration-to-unity/m-p/88776#M37612</guid>
      <dc:creator>filipniziol</dc:creator>
      <dc:date>2024-09-05T18:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Saving a file to /tmp is not working after migration to Unity Catalog</title>
      <link>https://community.databricks.com/t5/data-engineering/saving-a-file-to-tmp-is-not-working-after-migration-to-unity/m-p/119403#M45862</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/117376"&gt;@filipniziol&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could we use volumes for this temp processing rather than doing S3&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 02:25:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/saving-a-file-to-tmp-is-not-working-after-migration-to-unity/m-p/119403#M45862</guid>
      <dc:creator>Rahul6</dc:creator>
      <dc:date>2025-05-16T02:25:10Z</dc:date>
    </item>
  </channel>
</rss>

