<?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 Using Parquet, passing Partition on Insert Overwrite.  Partition  parenthesis includes equitation and it gives  an error. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/using-parquet-passing-partition-on-insert-overwrite-partition/m-p/31991#M23331</link>
    <description>&lt;P&gt;I am new on Spark sql, we are migrating our Cloudera to Databricks.  there are a lot of SQLs done, only a few are on going. &lt;/P&gt;&lt;P&gt;We are having some troubles during passing an argument and using it in an equitation on Partition section.  LOGDATE is an argument like 20220110. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INSERT OVERWRITE TABLE  database.user_segments
&amp;nbsp;
PARTITION( month_id  =  CAST( SUBSTRING ( CAST( $LOGDATE AS STRING), 1, 6) AS INT))
&amp;nbsp;
(
&amp;nbsp;
SELECT
&amp;nbsp;
 l.license_key,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;once we use this format we are getting error: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Error in SQL statement: ParseException: 
mismatched input '(' expecting STRING(line 2, pos 26)
&amp;nbsp;
== SQL ==
INSERT OVERWRITE TABLE veloxity.user_segment_by_network_usage
PARTITION( month_id = CAST( SUBSTRING ( CAST(20300101 AS STRING), 1, 6) AS INT))
--------------------------^^^&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;it would be great to have some help here.&lt;/P&gt;&lt;P&gt;best regards &lt;/P&gt;</description>
    <pubDate>Sun, 09 Jan 2022 22:10:21 GMT</pubDate>
    <dc:creator>saltuk</dc:creator>
    <dc:date>2022-01-09T22:10:21Z</dc:date>
    <item>
      <title>Using Parquet, passing Partition on Insert Overwrite.  Partition  parenthesis includes equitation and it gives  an error.</title>
      <link>https://community.databricks.com/t5/data-engineering/using-parquet-passing-partition-on-insert-overwrite-partition/m-p/31991#M23331</link>
      <description>&lt;P&gt;I am new on Spark sql, we are migrating our Cloudera to Databricks.  there are a lot of SQLs done, only a few are on going. &lt;/P&gt;&lt;P&gt;We are having some troubles during passing an argument and using it in an equitation on Partition section.  LOGDATE is an argument like 20220110. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INSERT OVERWRITE TABLE  database.user_segments
&amp;nbsp;
PARTITION( month_id  =  CAST( SUBSTRING ( CAST( $LOGDATE AS STRING), 1, 6) AS INT))
&amp;nbsp;
(
&amp;nbsp;
SELECT
&amp;nbsp;
 l.license_key,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;once we use this format we are getting error: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Error in SQL statement: ParseException: 
mismatched input '(' expecting STRING(line 2, pos 26)
&amp;nbsp;
== SQL ==
INSERT OVERWRITE TABLE veloxity.user_segment_by_network_usage
PARTITION( month_id = CAST( SUBSTRING ( CAST(20300101 AS STRING), 1, 6) AS INT))
--------------------------^^^&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;it would be great to have some help here.&lt;/P&gt;&lt;P&gt;best regards &lt;/P&gt;</description>
      <pubDate>Sun, 09 Jan 2022 22:10:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-parquet-passing-partition-on-insert-overwrite-partition/m-p/31991#M23331</guid>
      <dc:creator>saltuk</dc:creator>
      <dc:date>2022-01-09T22:10:21Z</dc:date>
    </item>
  </channel>
</rss>

