<?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: UDFs for working with date ranges in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/udfs-for-working-with-date-ranges/m-p/140198#M51352</link>
    <description>&lt;P&gt;Fantastic Initiative&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/198674"&gt;@hobrob&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;I have used Teradata for good 5+ years but pre-2014/5. So I will be closely following it and very happy to contribute to it. Thanks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Nov 2025 14:32:36 GMT</pubDate>
    <dc:creator>Raman_Unifeye</dc:creator>
    <dc:date>2025-11-24T14:32:36Z</dc:date>
    <item>
      <title>UDFs for working with date ranges</title>
      <link>https://community.databricks.com/t5/data-engineering/udfs-for-working-with-date-ranges/m-p/140022#M51331</link>
      <description>&lt;P&gt;Hi bricklayers,&lt;/P&gt;&lt;P&gt;Originally from a Teradata background and relatively new to Databricks, I was in need of brushing up on my Python and Github CI/CD skills so I’ve spun up a repo for a project I’m calling Terabricks.&lt;/P&gt;&lt;P&gt;The aim is to provide a space for making things that are useful in Teradata but don’t yet exist in bricks, available in bricks. Starting with a port of Teradata’s temporal functions and operators using Databricks UC UDFs written in Python.&lt;/P&gt;&lt;P&gt;These functions are designed to make your life easier if you’re working with type-2, 4 and 6 SCD data structures, or any scenario where you have periods of time that are bookended by a start and end date. For example, you can easily compare such periods for overlap, chronological order, and contiguousness.&lt;/P&gt;&lt;P&gt;If that sounds like it might be of use to you, please do head on over to &lt;A href="https://github.com/hobrob/terabricks" target="_blank" rel="noopener"&gt;the repo&lt;/A&gt; to find out more and let me know what you think. What awaits is an initial MVP with room for improvement - it needs some work to enhance scalability for example - and things like that can be prioritised if there is demand. If there are any other recovering Teradata-holics out there with ideas for other stuff they would like to see on bricks then I would love to hear it, and as a relative novice to CI/CD workflows, any contributions or advice in this space are also welcome.&lt;/P&gt;&lt;P&gt;Happy hunting!&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;</description>
      <pubDate>Sun, 23 Nov 2025 18:03:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/udfs-for-working-with-date-ranges/m-p/140022#M51331</guid>
      <dc:creator>hobrob</dc:creator>
      <dc:date>2025-11-23T18:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: UDFs for working with date ranges</title>
      <link>https://community.databricks.com/t5/data-engineering/udfs-for-working-with-date-ranges/m-p/140194#M51351</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/198674"&gt;@hobrob&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;This is such a cool idea&amp;nbsp; and honestly exactly the kind of thing that helps people crossing the bridge from Teradata to Databricks without losing their sanity on temporal logic every time &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Those type 2/4/6 SCD and period-comparison helpers are &lt;EM&gt;pain points&lt;/EM&gt; in almost every migration, so having a reusable, UC-backed set of functions is genuinely valuable, especially for teams who are still thinking in Teradata patterns but want to “land well” on the Lakehouse.&lt;/P&gt;&lt;P&gt;A few thoughts / ideas from my side:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;It would be great to see a couple of &lt;STRONG&gt;end-to-end examples&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;classic SCD2 customer dimension&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;overlapping policy / tariff periods&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;“find gaps” / “find overlaps” style queries using your UDFs&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Long-term, this could easily become a &lt;STRONG&gt;mini “Teradata to Databricks” toolkit&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;temporal helpers (what you’ve started)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;compatibility functions/operators people miss most&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;maybe even some “Teradata to Spark SQL” patterns documented.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;On the CI/CD side, even a simple &lt;STRONG&gt;GitHub Actions pipeline&lt;/STRONG&gt; that runs unit tests against a small Delta test dataset would be a great reference for others starting out.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Keep up with the great work!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2025 14:11:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/udfs-for-working-with-date-ranges/m-p/140194#M51351</guid>
      <dc:creator>bianca_unifeye</dc:creator>
      <dc:date>2025-11-24T14:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: UDFs for working with date ranges</title>
      <link>https://community.databricks.com/t5/data-engineering/udfs-for-working-with-date-ranges/m-p/140198#M51352</link>
      <description>&lt;P&gt;Fantastic Initiative&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/198674"&gt;@hobrob&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;I have used Teradata for good 5+ years but pre-2014/5. So I will be closely following it and very happy to contribute to it. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Nov 2025 14:32:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/udfs-for-working-with-date-ranges/m-p/140198#M51352</guid>
      <dc:creator>Raman_Unifeye</dc:creator>
      <dc:date>2025-11-24T14:32:36Z</dc:date>
    </item>
  </channel>
</rss>

