<?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 Move Files from S3 to Local File System with Unity Catalog Enabled in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/move-files-from-s3-to-local-file-system-with-unity-catalog/m-p/37913#M26508</link>
    <description>&lt;P&gt;Dear Databricks Community Experts,&lt;/P&gt;&lt;P&gt;I am working on databricks on AWS with unity catalog.&lt;/P&gt;&lt;P&gt;One usecase for me is to uncompress files with many extensions there on S3 Bucket.&lt;/P&gt;&lt;P&gt;Below is my strategy:-&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Move files from S3 to Local file system (where spark driver is running) via dbutils.fs.mv(dbfs_file, local_file)&lt;/LI&gt;&lt;LI&gt;Uncompress files via shell commands or packages in python&lt;/LI&gt;&lt;LI&gt;Move back uncompressed files to S3 via dbutils&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here,&lt;/P&gt;&lt;P&gt;dbfs_file ==&amp;gt; s3://path_to_file or dbfs://path_to_file (I am using unit catalog and not mounting method)&lt;/P&gt;&lt;P&gt;local_file ==&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A target="_blank" rel="noopener"&gt;file:///tmp/path_to_file,&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When i use&amp;nbsp;dbutils.fs.cp(dbfs_file, local_file),&amp;nbsp;I am getting error as below -&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR -&amp;nbsp;&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;&lt;P&gt;How to apply write permissions and resolve this issue.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-07-18 at 10.57.19 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2885i7799270762F94970/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-07-18 at 10.57.19 AM.png" alt="Screenshot 2023-07-18 at 10.57.19 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jul 2023 04:19:47 GMT</pubDate>
    <dc:creator>madhav_dhruve</dc:creator>
    <dc:date>2023-07-19T04:19:47Z</dc:date>
    <item>
      <title>Move Files from S3 to Local File System with Unity Catalog Enabled</title>
      <link>https://community.databricks.com/t5/data-engineering/move-files-from-s3-to-local-file-system-with-unity-catalog/m-p/37913#M26508</link>
      <description>&lt;P&gt;Dear Databricks Community Experts,&lt;/P&gt;&lt;P&gt;I am working on databricks on AWS with unity catalog.&lt;/P&gt;&lt;P&gt;One usecase for me is to uncompress files with many extensions there on S3 Bucket.&lt;/P&gt;&lt;P&gt;Below is my strategy:-&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Move files from S3 to Local file system (where spark driver is running) via dbutils.fs.mv(dbfs_file, local_file)&lt;/LI&gt;&lt;LI&gt;Uncompress files via shell commands or packages in python&lt;/LI&gt;&lt;LI&gt;Move back uncompressed files to S3 via dbutils&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here,&lt;/P&gt;&lt;P&gt;dbfs_file ==&amp;gt; s3://path_to_file or dbfs://path_to_file (I am using unit catalog and not mounting method)&lt;/P&gt;&lt;P&gt;local_file ==&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A target="_blank" rel="noopener"&gt;file:///tmp/path_to_file,&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When i use&amp;nbsp;dbutils.fs.cp(dbfs_file, local_file),&amp;nbsp;I am getting error as below -&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR -&amp;nbsp;&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;&lt;P&gt;How to apply write permissions and resolve this issue.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-07-18 at 10.57.19 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/2885i7799270762F94970/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-07-18 at 10.57.19 AM.png" alt="Screenshot 2023-07-18 at 10.57.19 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2023 04:19:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/move-files-from-s3-to-local-file-system-with-unity-catalog/m-p/37913#M26508</guid>
      <dc:creator>madhav_dhruve</dc:creator>
      <dc:date>2023-07-19T04:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Move Files from S3 to Local File System with Unity Catalog Enabled</title>
      <link>https://community.databricks.com/t5/data-engineering/move-files-from-s3-to-local-file-system-with-unity-catalog/m-p/50131#M28720</link>
      <description>&lt;P&gt;did you find a solution to this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 18:39:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/move-files-from-s3-to-local-file-system-with-unity-catalog/m-p/50131#M28720</guid>
      <dc:creator>rvadali2</dc:creator>
      <dc:date>2023-10-30T18:39:45Z</dc:date>
    </item>
  </channel>
</rss>

