<?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 Upload to Volume in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/upload-to-volume/m-p/80952#M36171</link>
    <description>&lt;P&gt;How to programmatically upload parquet files from Azure data lake to Catalog's Volumes?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;source_path = "abfss://datalake-raw-dev@xxx.dfs.core.windows.net/xxxxx/saxxles/xx/source/ETL/transformed_data/parquet/"

# Define the path to your Unity Catalog Volume
destination_path = "dbfs:/Volumes/xxx/xxx/transformed_parquet"

# Read the Parquet files from the source into a DataFrame
df = spark.read.parquet(source_path)
print('so far okay')
# Write the DataFrame to the Unity Catalog Volume
df.write.mode("overwrite").parquet(destination_path)

print(f"Data successfully copied to {destination_path}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try the method above but it says I cannot access Volume this way, how to programmatically do it without using the UI&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jul 2024 08:51:28 GMT</pubDate>
    <dc:creator>ruoyuqian</dc:creator>
    <dc:date>2024-07-29T08:51:28Z</dc:date>
    <item>
      <title>Upload to Volume</title>
      <link>https://community.databricks.com/t5/data-engineering/upload-to-volume/m-p/80952#M36171</link>
      <description>&lt;P&gt;How to programmatically upload parquet files from Azure data lake to Catalog's Volumes?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;source_path = "abfss://datalake-raw-dev@xxx.dfs.core.windows.net/xxxxx/saxxles/xx/source/ETL/transformed_data/parquet/"

# Define the path to your Unity Catalog Volume
destination_path = "dbfs:/Volumes/xxx/xxx/transformed_parquet"

# Read the Parquet files from the source into a DataFrame
df = spark.read.parquet(source_path)
print('so far okay')
# Write the DataFrame to the Unity Catalog Volume
df.write.mode("overwrite").parquet(destination_path)

print(f"Data successfully copied to {destination_path}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try the method above but it says I cannot access Volume this way, how to programmatically do it without using the UI&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 08:51:28 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/upload-to-volume/m-p/80952#M36171</guid>
      <dc:creator>ruoyuqian</dc:creator>
      <dc:date>2024-07-29T08:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Upload to Volume</title>
      <link>https://community.databricks.com/t5/data-engineering/upload-to-volume/m-p/80954#M36172</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/114079"&gt;@ruoyuqian&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please use &lt;STRONG&gt;dbutils.fs.cp(sourcePath,destination_path)&lt;/STRONG&gt; that will be able to load data in volume.&lt;/P&gt;&lt;P&gt;If still having issue, please check for access of running via job.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 09:35:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/upload-to-volume/m-p/80954#M36172</guid>
      <dc:creator>Ajay-Pandey</dc:creator>
      <dc:date>2024-07-29T09:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Upload to Volume</title>
      <link>https://community.databricks.com/t5/data-engineering/upload-to-volume/m-p/80964#M36177</link>
      <description>&lt;P&gt;Besides, when accessing volumes, you don't need to provide dbfs protocol: `/Volumes/xxx/xxx/transformed_parquet`&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 11:05:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/upload-to-volume/m-p/80964#M36177</guid>
      <dc:creator>Witold</dc:creator>
      <dc:date>2024-07-29T11:05:39Z</dc:date>
    </item>
  </channel>
</rss>

