<?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: Need to move files from one Volume to other in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/103137#M2590</link>
    <description>&lt;P&gt;Thanks for that&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/132810"&gt;@MujtabaNoori&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of using a notebook, can I use Workspaceclient part of databrick sdk and move the files?&lt;/P&gt;</description>
    <pubDate>Tue, 24 Dec 2024 13:30:16 GMT</pubDate>
    <dc:creator>navi_bricks</dc:creator>
    <dc:date>2024-12-24T13:30:16Z</dc:date>
    <item>
      <title>Need to move files from one Volume to other</title>
      <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/102627#M2559</link>
      <description>&lt;P&gt;We recently enabled Unity catalog on our workspace, as part of certain transformations(Custom clustered Datapipelines(python)) we need to move file from one volume to other volume.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As the job itself runs on a service principal that has access to external storage, we don't want to pass in any credentials. Can we achieve this? We tried with OS, DbUtils, and Workspace client, all of which need service principal credentials. Finally the reading of volume we achieved through spark context itself, but moving of files we need other way, please help.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 08:41:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/102627#M2559</guid>
      <dc:creator>navi_bricks</dc:creator>
      <dc:date>2024-12-19T08:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need to move files from one Volume to other</title>
      <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/102644#M2561</link>
      <description>&lt;P&gt;You should be able to use&amp;nbsp;dbutils.fs.cp to copy the file but you jus need to ensure that the SP has&amp;nbsp;WRITE VOLUME permission on the destination Volume.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 11:40:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/102644#M2561</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-12-19T11:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need to move files from one Volume to other</title>
      <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/102646#M2562</link>
      <description>&lt;P&gt;Thanks for that,&lt;/P&gt;&lt;P&gt;But I have a Python data pipeline running under a custom cluster, and its not working from there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 11:47:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/102646#M2562</guid>
      <dc:creator>navi_bricks</dc:creator>
      <dc:date>2024-12-19T11:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need to move files from one Volume to other</title>
      <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/102649#M2563</link>
      <description>&lt;P&gt;What is the error being received? And does the SP has the mentioned permission in UC?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 11:51:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/102649#M2563</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-12-19T11:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need to move files from one Volume to other</title>
      <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/102959#M2586</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/136952"&gt;@navi_bricks&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;It can be achieved by creating a new notebook and writing the &lt;STRONG&gt;db utils cp or mv&lt;/STRONG&gt; command in that notebook. After that, you can create a workflow or an small&amp;nbsp; independent ADF pipeline using the same SP which has the permission. It will run and move the files.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 07:24:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/102959#M2586</guid>
      <dc:creator>MujtabaNoori</dc:creator>
      <dc:date>2024-12-23T07:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need to move files from one Volume to other</title>
      <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/103137#M2590</link>
      <description>&lt;P&gt;Thanks for that&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/132810"&gt;@MujtabaNoori&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of using a notebook, can I use Workspaceclient part of databrick sdk and move the files?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 13:30:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/103137#M2590</guid>
      <dc:creator>navi_bricks</dc:creator>
      <dc:date>2024-12-24T13:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need to move files from one Volume to other</title>
      <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/104164#M2672</link>
      <description>&lt;P&gt;You can try:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;from databricks.sdk import WorkspaceClient

# Initialize the WorkspaceClient
w = WorkspaceClient()

# Define source and destination paths
source_path = "/Volumes/&amp;lt;source_catalog&amp;gt;/&amp;lt;source_schema&amp;gt;/&amp;lt;source_volume&amp;gt;/&amp;lt;file_name&amp;gt;"
destination_path = "/Volumes/&amp;lt;destination_catalog&amp;gt;/&amp;lt;destination_schema&amp;gt;/&amp;lt;destination_volume&amp;gt;/&amp;lt;file_name&amp;gt;"

# Move the file
w.files.move(source_path, destination_path)

# Verify the file has been moved
for item in w.files.list_directory_contents(f"/Volumes/&amp;lt;destination_catalog&amp;gt;/&amp;lt;destination_schema&amp;gt;/&amp;lt;destination_volume&amp;gt;"):
    print(item.path)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 Jan 2025 22:45:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/104164#M2672</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2025-01-03T22:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need to move files from one Volume to other</title>
      <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/105705#M2762</link>
      <description>&lt;P&gt;Sorry for the late reply. I was on vacation and didn't check this out. I tried this but always got the error "default auth: cannot configure default credentials." I even tried to use it with client ID and secret being passed as arguments.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 13:02:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/105705#M2762</guid>
      <dc:creator>navi_bricks</dc:creator>
      <dc:date>2025-01-15T13:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need to move files from one Volume to other</title>
      <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/105742#M2765</link>
      <description>&lt;P&gt;# Using Databricks CLI profile to access the workspace.&lt;BR /&gt;w = WorkspaceClient(profile="&amp;lt;&amp;lt;profilename&amp;gt;&amp;gt;")&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;w&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;WorkspaceClient&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;host&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;databricks_host&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;client_id&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;app_id&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;client_secret&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;app_secret&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;auth_type&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"azure-cli"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OR&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; azure.identity &lt;/SPAN&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; ClientSecretCredential&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;credential&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; ClientSecretCredential(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;tenant_id&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;lt;tenant-id&amp;gt;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;client_id&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;lt;client-id&amp;gt;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;client_secret&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;lt;client-secret&amp;gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Get the access token for Databricks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;token&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;credential&lt;/SPAN&gt;&lt;SPAN&gt;.get_token(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://databricks.azure.net/.default" target="_blank" rel="noopener"&gt;https://databricks.azure.net/.default&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;).token&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;# Initialize the WorkspaceClient using the service principal token&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;client&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; WorkspaceClient(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;host&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"https://&amp;lt;databricks-instance&amp;gt;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;token&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;token&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OR&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;# Initialize the WorkspaceClient using an OAuth token&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;w&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; WorkspaceClient(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;host&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"https://&amp;lt;databricks-instance&amp;gt;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;token&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;lt;oauth-token&amp;gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OR&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;w = WorkspaceClient&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;host&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;databricks_host&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;token&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;pat_token&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Jan 2025 15:45:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/105742#M2765</guid>
      <dc:creator>saurabh18cs</dc:creator>
      <dc:date>2025-01-15T15:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need to move files from one Volume to other</title>
      <link>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/105775#M2768</link>
      <description>&lt;P&gt;Not all job clusters work well with Volumes. I used following type cluster to access files from Volume.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dnirmania_0-1736959382755.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14145i29543544891ADA1E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dnirmania_0-1736959382755.png" alt="Dnirmania_0-1736959382755.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dnirmania_1-1736959432923.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14146iBA1638C506D2C61C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dnirmania_1-1736959432923.png" alt="Dnirmania_1-1736959432923.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 16:45:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/need-to-move-files-from-one-volume-to-other/m-p/105775#M2768</guid>
      <dc:creator>Dnirmania</dc:creator>
      <dc:date>2025-01-15T16:45:22Z</dc:date>
    </item>
  </channel>
</rss>

