<?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: External Table from partitioned CSV in Unity Catalog. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/external-table-from-partitioned-csv-in-unity-catalog/m-p/58592#M31208</link>
    <description>&lt;P&gt;Thanks Kaniz,&lt;/P&gt;&lt;P&gt;I'm using an &lt;STRONG&gt;External Location authenticated using a Managed Identity&lt;/STRONG&gt;. The very same used for the non-partitioned table and many others that works pretty fine. This&lt;STRONG&gt; account has Storage Blob Contributor rights&lt;/STRONG&gt; for all containers and folders in the storage account.&lt;/P&gt;&lt;P&gt;The path is also correct,&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'abfss://temp@storage0account0name.dfs.core.windows.net/&amp;lt;schema&amp;gt;/DW/_partitioned/dw_agent_file&lt;STRONG&gt;/*/*&lt;/STRONG&gt;', note that I'm&lt;STRONG&gt; using /*/* for year/month reference.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It seems that when I replace the identified path by /*/* its not being able to use the registered EXTERNAL LOCATION and it's trying to access via cluster access credentials (which are not being provided) in the Admin/Compute/SQL Warehouses/Data Security. As my understanding these aren't required for Unity Catalog assets.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jan 2024 09:50:22 GMT</pubDate>
    <dc:creator>vpaluch</dc:creator>
    <dc:date>2024-01-29T09:50:22Z</dc:date>
    <item>
      <title>External Table from partitioned CSV in Unity Catalog.</title>
      <link>https://community.databricks.com/t5/data-engineering/external-table-from-partitioned-csv-in-unity-catalog/m-p/58504#M31190</link>
      <description>&lt;P&gt;When I create an &lt;STRONG&gt;External Table &lt;/STRONG&gt;in unity catalog&amp;nbsp;from a flattened csv folder, it&amp;nbsp; works as expected:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CREATE EXTERNAL LOCATION IF NOT EXISTS raw_data
  URL 'abfss://raw@storage0account0name.dfs.core.windows.net'
  WITH  ( STORAGE CREDENTIAL `a579a115-8958-.....`)
  COMMENT 'RAW Data';

DROP  TABLE IF EXISTS raw_files.&amp;lt;schema&amp;gt;.dw_agent;

CREATE TABLE raw_files.&amp;lt;schema&amp;gt;.dw_agent (
  Retailer_ID STRING,
  Retailer_Status INT,
  Retailer_Status_Mapped STRING,
  Retailer_Longitude DOUBLE
)
USING csv
OPTIONS (
    'header' = 'true',
    'sep' = '~',
    'compression' = 'gzip' )
LOCATION 'abfss://temp@storage0account0name.dfs.core.windows.net/&amp;lt;schema&amp;gt;/DW/_flatten/dw_agent_file';
SELECT * FROM raw_files.&amp;lt;schema&amp;gt;.dw_agent_file  LIMIT 1000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But if the CSV file is &lt;STRONG&gt;partitioned by Year/Date,&lt;/STRONG&gt; I replace the &lt;STRONG&gt;LOCATION&lt;/STRONG&gt; by:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;'abfss://temp@storage0account0name.dfs.core.windows.net/&amp;lt;schema&amp;gt;/DW/_partitioned/dw_agent_file/*/*';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm getting the following error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Operation failed: "Server failed to authenticate the request.
Make sure the value of Authorization header is formed correctly including the signature."
, 403, GET, https://storage0account0name.dfs.core.windows.net/prod?upn=false&amp;amp;resource=filesystem&amp;amp;maxResults=5000&amp;amp;directory=folder_name/DW/dw_agent_file&amp;amp;timeout=90&amp;amp;recursive=false&amp;amp;st=2024-01-26T22:46:00Z&amp;amp;sv=2020-02-10&amp;amp;ske=2024-01-27T00:46:00Z&amp;amp;sig=XXXXX&amp;amp;sktid=910757d4-7f42-4cda-b0a2-b78bdde4c812&amp;amp;se=2024-01-27T00:43:27Z&amp;amp;sdd=5&amp;amp;skoid=a2301c4c-cef3-4ab8XXXXXXXXXXXXXXXXXX&amp;amp;spr=https&amp;amp;sks=b&amp;amp;skt=2024-01-26T22:46:00Z&amp;amp;sp=rl&amp;amp;skv=2020-02-10&amp;amp;sr=d, AuthenticationFailed, "Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:19100423-001f-0009-12b1-501e2e000000 Time:2024-01-26T23:43:27.8051986Z"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;The storage account is the same, the only difference is the CSV file is now distributed in subfolders.&lt;/LI&gt;&lt;LI&gt;I'm using the very same EXTERNAL LOCATION and CREDENTIALS.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;There is any restriction to use partitioned csv's as external tables? I couldn't find find a single example in this scenario.&lt;/P&gt;&lt;P&gt;Thanks for helping.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jan 2024 00:02:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/external-table-from-partitioned-csv-in-unity-catalog/m-p/58504#M31190</guid>
      <dc:creator>vpaluch</dc:creator>
      <dc:date>2024-01-27T00:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: External Table from partitioned CSV in Unity Catalog.</title>
      <link>https://community.databricks.com/t5/data-engineering/external-table-from-partitioned-csv-in-unity-catalog/m-p/58592#M31208</link>
      <description>&lt;P&gt;Thanks Kaniz,&lt;/P&gt;&lt;P&gt;I'm using an &lt;STRONG&gt;External Location authenticated using a Managed Identity&lt;/STRONG&gt;. The very same used for the non-partitioned table and many others that works pretty fine. This&lt;STRONG&gt; account has Storage Blob Contributor rights&lt;/STRONG&gt; for all containers and folders in the storage account.&lt;/P&gt;&lt;P&gt;The path is also correct,&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;'abfss://temp@storage0account0name.dfs.core.windows.net/&amp;lt;schema&amp;gt;/DW/_partitioned/dw_agent_file&lt;STRONG&gt;/*/*&lt;/STRONG&gt;', note that I'm&lt;STRONG&gt; using /*/* for year/month reference.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It seems that when I replace the identified path by /*/* its not being able to use the registered EXTERNAL LOCATION and it's trying to access via cluster access credentials (which are not being provided) in the Admin/Compute/SQL Warehouses/Data Security. As my understanding these aren't required for Unity Catalog assets.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 09:50:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/external-table-from-partitioned-csv-in-unity-catalog/m-p/58592#M31208</guid>
      <dc:creator>vpaluch</dc:creator>
      <dc:date>2024-01-29T09:50:22Z</dc:date>
    </item>
  </channel>
</rss>

