cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Partition In Spark with subqeury which include Union

Jeewan
New Contributor

I have a SQL query like this:
select ... from table1 where id in (slect id from table 1 where (some condition) UNION select id from table2 where (some condition)) table1

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)  where table is the query mentioned above.

How will the internal query in Spark look like? Since we are using UNION will it not affect the partitioning? 

0 REPLIES 0

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now