<?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 Partition In Spark with subqeury which include Union in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/partition-in-spark-with-subqeury-which-include-union/m-p/81859#M36433</link>
    <description>&lt;P&gt;I have a SQL query like this:&lt;BR /&gt;select ... from table1 where id in (slect id from table 1 where (some condition) UNION select id from table2 where (some condition)) table1&lt;BR /&gt;&lt;BR /&gt;I have made a partition of 200 where upper bound is 200 and lower bound is 0 and partition will be done on partition_key column which has value ranged from 1 to 200. I am using JDBC connector. I am passing options("dbtable,table)&amp;nbsp; where table is the query mentioned above.&lt;BR /&gt;&lt;BR /&gt;How will the internal query in Spark look like? Since we are using UNION will it not affect the partitioning?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2024 10:26:13 GMT</pubDate>
    <dc:creator>Jeewan</dc:creator>
    <dc:date>2024-08-05T10:26:13Z</dc:date>
    <item>
      <title>Partition In Spark with subqeury which include Union</title>
      <link>https://community.databricks.com/t5/data-engineering/partition-in-spark-with-subqeury-which-include-union/m-p/81859#M36433</link>
      <description>&lt;P&gt;I have a SQL query like this:&lt;BR /&gt;select ... from table1 where id in (slect id from table 1 where (some condition) UNION select id from table2 where (some condition)) table1&lt;BR /&gt;&lt;BR /&gt;I have made a partition of 200 where upper bound is 200 and lower bound is 0 and partition will be done on partition_key column which has value ranged from 1 to 200. I am using JDBC connector. I am passing options("dbtable,table)&amp;nbsp; where table is the query mentioned above.&lt;BR /&gt;&lt;BR /&gt;How will the internal query in Spark look like? Since we are using UNION will it not affect the partitioning?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 10:26:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/partition-in-spark-with-subqeury-which-include-union/m-p/81859#M36433</guid>
      <dc:creator>Jeewan</dc:creator>
      <dc:date>2024-08-05T10:26:13Z</dc:date>
    </item>
  </channel>
</rss>

