<?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 Presto hive table to delta table conversion in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35032#M25717</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I am using the below sql query to generate the days in order in hive &amp;amp; it is working fine. The table got migrated to delta and my query is failing. It would be appreciated if someone helps me to figure out the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Query :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;explode_dates as (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;with list_of_dates as (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SELECT CAST(date_column AS DATE) AS DAY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FROM (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VALUES (SEQUENCE(cast('2021-01-01' AS date), date_add('day',-1,current_date), INTERVAL '1' DAY) )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;) AS t1(date_array)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CROSS JOIN UNNEST(date_array) AS t2(date_column)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select a.day as KPI_DATE, month(b.day) as dates_month, b.day as dates from list_of_dates a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;join list_of_dates b on b.day between date_trunc('quarter', date_add('day',0,a.day)) and&amp;nbsp;a.day&amp;nbsp;)&lt;/P&gt;</description>
    <pubDate>Mon, 15 Nov 2021 17:19:33 GMT</pubDate>
    <dc:creator>SQL</dc:creator>
    <dc:date>2021-11-15T17:19:33Z</dc:date>
    <item>
      <title>Presto hive table to delta table conversion</title>
      <link>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35032#M25717</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I am using the below sql query to generate the days in order in hive &amp;amp; it is working fine. The table got migrated to delta and my query is failing. It would be appreciated if someone helps me to figure out the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Query :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;explode_dates as (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;with list_of_dates as (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SELECT CAST(date_column AS DATE) AS DAY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FROM (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VALUES (SEQUENCE(cast('2021-01-01' AS date), date_add('day',-1,current_date), INTERVAL '1' DAY) )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;) AS t1(date_array)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CROSS JOIN UNNEST(date_array) AS t2(date_column)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select a.day as KPI_DATE, month(b.day) as dates_month, b.day as dates from list_of_dates a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;join list_of_dates b on b.day between date_trunc('quarter', date_add('day',0,a.day)) and&amp;nbsp;a.day&amp;nbsp;)&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 17:19:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35032#M25717</guid>
      <dc:creator>SQL</dc:creator>
      <dc:date>2021-11-15T17:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Presto hive table to delta table conversion</title>
      <link>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35033#M25718</link>
      <description>&lt;P&gt;Hi @Arumugam Perumal​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide more details.  What is the error you are getting? can you share the error stack trace? &lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 18:51:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35033#M25718</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2021-11-15T18:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Presto hive table to delta table conversion</title>
      <link>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35034#M25719</link>
      <description>&lt;P&gt;Hi @Jose Gonzalez​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     I am getting below error message .I have changed the date_add function in order to compatible with Delta (date_add('day',-1,current_date), INTERVAL '1' DAY) )&amp;nbsp; --&amp;gt; date_add(current_date,-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Error Message:&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR processing query/statement. Error Code: 0, SQL state: org.apache.hive.service.cli.HiveSQLException: Error running query: org.apache.spark.sql.AnalysisException: cannot resolve '`date_array`' given input columns: [];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 06:07:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35034#M25719</guid>
      <dc:creator>SQL</dc:creator>
      <dc:date>2021-11-16T06:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Presto hive table to delta table conversion</title>
      <link>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35035#M25720</link>
      <description>&lt;P&gt;Hi @Arumugam Perumal​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was checking the list of build in functions and it seems like we do not have "date_array". You can check the &lt;A href="https://spark.apache.org/docs/latest/api/sql/index.html" alt="https://spark.apache.org/docs/latest/api/sql/index.html" target="_blank"&gt;docs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 17:59:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35035#M25720</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2021-11-17T17:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Presto hive table to delta table conversion</title>
      <link>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35036#M25721</link>
      <description>&lt;P&gt;could you please help me with the alternative function for date_array&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 05:20:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35036#M25721</guid>
      <dc:creator>SQL</dc:creator>
      <dc:date>2021-11-18T05:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Presto hive table to delta table conversion</title>
      <link>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35037#M25722</link>
      <description>&lt;P&gt;Does any other date() function help you to solve this issue?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:20:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/35037#M25722</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2021-12-10T23:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Presto hive table to delta table conversion</title>
      <link>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/105670#M42235</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/29078"&gt;@SQL&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/29880"&gt;@jose_gonzalez&lt;/a&gt;&amp;nbsp;, Have you tried code conversion tool from&lt;A title="Code Converter, ETL Converter, Report converter tool" href="https://travinto.com/products/code-converter?utm_souce=databricks&amp;amp;utm_campaign=answer-comment" target="_self"&gt;Travinto technologies&lt;/A&gt;&amp;nbsp; ? They have &lt;A title=" hive to delta table conversion" href="https://travinto.com/products/code-converter/hive-to-deltatable" target="_blank" rel="noopener"&gt;hive to delta table conversion&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 07:35:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/presto-hive-table-to-delta-table-conversion/m-p/105670#M42235</guid>
      <dc:creator>thelogicplus</dc:creator>
      <dc:date>2025-01-15T07:35:54Z</dc:date>
    </item>
  </channel>
</rss>

