<?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 Creating External Table from partitioned parquet table in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/creating-external-table-from-partitioned-parquet-table/m-p/64196#M32489</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I am trying to create an external table in catalog using parquet where the parquet file is partitioned &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have tried using the below syntax,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%sql&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CREATE TABLE table_name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;col1 type1,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;col2 type2,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;col3 type3,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;USING parquet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;PARTITIONED BY ( col4 type4)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOCATION "s3://&amp;lt;bucket-name&amp;gt;/&amp;lt;folder-name&amp;gt;/parquet_file/"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;which gives success in creating the table &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but no data is shown when i try to select the table&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone let me know what am i doing wrong.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2024 15:42:59 GMT</pubDate>
    <dc:creator>data_extractor</dc:creator>
    <dc:date>2024-03-20T15:42:59Z</dc:date>
    <item>
      <title>Creating External Table from partitioned parquet table</title>
      <link>https://community.databricks.com/t5/data-engineering/creating-external-table-from-partitioned-parquet-table/m-p/64196#M32489</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am trying to create an external table in catalog using parquet where the parquet file is partitioned &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have tried using the below syntax,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%sql&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CREATE TABLE table_name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;col1 type1,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;col2 type2,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;col3 type3,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;USING parquet&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;PARTITIONED BY ( col4 type4)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOCATION "s3://&amp;lt;bucket-name&amp;gt;/&amp;lt;folder-name&amp;gt;/parquet_file/"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;which gives success in creating the table &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but no data is shown when i try to select the table&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can someone let me know what am i doing wrong.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 15:42:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/creating-external-table-from-partitioned-parquet-table/m-p/64196#M32489</guid>
      <dc:creator>data_extractor</dc:creator>
      <dc:date>2024-03-20T15:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating External Table from partitioned parquet table</title>
      <link>https://community.databricks.com/t5/data-engineering/creating-external-table-from-partitioned-parquet-table/m-p/64207#M32496</link>
      <description>&lt;P&gt;This is my guess&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT size="4"&gt;Your code (LOCATION "s3://&amp;lt;bucket-name&amp;gt;/&amp;lt;folder-name&amp;gt;/parquet_file/) is likely pointing to a single Parquet file instead of the entire folder containing partitioned data.&lt;BR /&gt;try this&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;CREATE TABLE table_name
(
  col1 type1,
  col2 type2,
  col3 type3,
)
USING parquet
PARTITIONED BY (col4 type4)
LOCATION "s3://&amp;lt;bucket-name&amp;gt;/&amp;lt;folder-name&amp;gt;/"  -- Include trailing slash for the folder&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Mar 2024 20:51:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/creating-external-table-from-partitioned-parquet-table/m-p/64207#M32496</guid>
      <dc:creator>MichTalebzadeh</dc:creator>
      <dc:date>2024-03-20T20:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Creating External Table from partitioned parquet table</title>
      <link>https://community.databricks.com/t5/data-engineering/creating-external-table-from-partitioned-parquet-table/m-p/91554#M38197</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102589"&gt;@data_extractor&lt;/a&gt;&amp;nbsp;, How were you able to fix this problem? I am having same issue now&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 09:47:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/creating-external-table-from-partitioned-parquet-table/m-p/91554#M38197</guid>
      <dc:creator>Chizzy</dc:creator>
      <dc:date>2024-09-24T09:47:26Z</dc:date>
    </item>
  </channel>
</rss>

