<?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: Are there any plans to add functions on the partition by fields of a delta table definition such as day() ?  A similar capability exists in iceberg. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21922#M14985</link>
    <description>&lt;P&gt;Just to update the post, this does work:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You have a timestamp column&lt;/LI&gt;&lt;LI&gt;Generate a date column from the timestamp column&lt;/LI&gt;&lt;LI&gt;Partition on that generated date column&lt;/LI&gt;&lt;LI&gt;Write a query that filters on the original timestamp column&lt;UL&gt;&lt;LI&gt;Databricks will only scan partitions within the date range.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Mon, 27 Feb 2023 14:59:47 GMT</pubDate>
    <dc:creator>RyanHager</dc:creator>
    <dc:date>2023-02-27T14:59:47Z</dc:date>
    <item>
      <title>Are there any plans to add functions on the partition by fields of a delta table definition such as day() ?  A similar capability exists in iceberg.</title>
      <link>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21916#M14979</link>
      <description>&lt;P&gt;Benefit:  This will help simplify the where clauses of the consumers of the tables?    Just query on the main date field if I need all the data for a day.  Not an extra day field we had to make.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 19:15:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21916#M14979</guid>
      <dc:creator>RyanHager</dc:creator>
      <dc:date>2022-04-28T19:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Are there any plans to add functions on the partition by fields of a delta table definition such as day() ?  A similar capability exists in iceberg.</title>
      <link>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21917#M14980</link>
      <description>&lt;P&gt;@Ryan Hager​&amp;nbsp;, yes it is possible using AUTO GENERATED COLUMNS since delta lake 1.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;For example, you can automatically generate a date column (for partitioning the table by date) from the timestamp column; any writes into the table need only specify the data for the timestamp column.&lt;/I&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;(DeltaTable.create(spark)
.tableName("default.people10m") 
 .addColumn("id", "INT") 
 .addColumn("birthDate", "TIMESTAMP") 
 .addColumn("dateOfBirth", DateType(), generatedAlwaysAs="CAST(birthDate AS DATE)") 
 .partitionedBy("dateOfBirth") 
 .execute())&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 May 2022 17:35:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21917#M14980</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-05-07T17:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Are there any plans to add functions on the partition by fields of a delta table definition such as day() ?  A similar capability exists in iceberg.</title>
      <link>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21919#M14982</link>
      <description>&lt;P&gt;Does this mean the execution plan for the following query that uses the original timestamp column will only scan 3 partitions and we don't have to use the dateOfBirth column in the where clause?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select id,birthDate from default.people10m
where birthDate  &amp;gt; cast('2022-05-01 08:00:00.000000 America/Chicago' as timestamp)
and birthDate  &amp;lt; cast('2022-05-03 08:00:00.000000 America/Chicago' as timestamp)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 13:44:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21919#M14982</guid>
      <dc:creator>RyanHager</dc:creator>
      <dc:date>2022-05-13T13:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Are there any plans to add functions on the partition by fields of a delta table definition such as day() ?  A similar capability exists in iceberg.</title>
      <link>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21920#M14983</link>
      <description>&lt;P&gt;Clarification is still open.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 00:45:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21920#M14983</guid>
      <dc:creator>RyanHager</dc:creator>
      <dc:date>2022-07-12T00:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Are there any plans to add functions on the partition by fields of a delta table definition such as day() ?  A similar capability exists in iceberg.</title>
      <link>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21921#M14984</link>
      <description>&lt;P&gt;@Kaniz Fatma​&amp;nbsp;Can you help me get clarification on this?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 16:26:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21921#M14984</guid>
      <dc:creator>RyanHager</dc:creator>
      <dc:date>2022-08-19T16:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Are there any plans to add functions on the partition by fields of a delta table definition such as day() ?  A similar capability exists in iceberg.</title>
      <link>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21922#M14985</link>
      <description>&lt;P&gt;Just to update the post, this does work:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You have a timestamp column&lt;/LI&gt;&lt;LI&gt;Generate a date column from the timestamp column&lt;/LI&gt;&lt;LI&gt;Partition on that generated date column&lt;/LI&gt;&lt;LI&gt;Write a query that filters on the original timestamp column&lt;UL&gt;&lt;LI&gt;Databricks will only scan partitions within the date range.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 27 Feb 2023 14:59:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/are-there-any-plans-to-add-functions-on-the-partition-by-fields/m-p/21922#M14985</guid>
      <dc:creator>RyanHager</dc:creator>
      <dc:date>2023-02-27T14:59:47Z</dc:date>
    </item>
  </channel>
</rss>

