[Spark SQL]: Does Spark preserve the order in a nested ORDER BY?

2022-08-19 Thread Vinay Londhe
Hello

I searched on StackOverflow and Github issues of the Spark project but
could not find an answer.

If I have a Spark SQL query in which the ORDER BY clause is in a nested
subquery, are we guaranteed that Spark will always output sorted results?

For example, if I have a query like the following
SELECT * FROM (SELECT a, b, c FROM my_table ORDER BY a LIMIT 10) WHERE b >
50
is it guaranteed that the final output in Spark is ordered by column "a"?

I ask because in some databases, the inner ORDER BY is ignored completely (
https://stackoverflow.com/questions/16248813/is-order-in-a-subquery-guaranteed-to-be-preserved,
https://mariadb.com/kb/en/why-is-order-by-in-a-from-subquery-ignored)

Thank you
Regards
Vinay Londhe


Re: [EXTERNAL] Re: Spark streaming

2022-08-19 Thread Saurabh Gulati
You can also try out 
https://debezium.io/documentation/reference/0.10/connectors/mysql.html

From: Ajit Kumar Amit 
Sent: 19 August 2022 14:30
To: sandra sukumaran 
Cc: user@spark.apache.org 
Subject: [EXTERNAL] Re: Spark streaming

Caution! This email originated outside of FedEx. Please do not open attachments 
or click links from an unknown or suspicious origin.

https://github.com/allwefantasy/spark-binlog

Sent from my iPhone

On 19 Aug 2022, at 5:45 PM, sandra sukumaran  
wrote:


Dear Sir,



 Is there any possible method to fetch MySQL database bin log, with the 
help of spark streaming.
Kafka streaming is not applicable in this case.



Thanks and regards
Sandra


Re: Spark streaming

2022-08-19 Thread Ajit Kumar Amit
https://github.com/allwefantasy/spark-binlog

Sent from my iPhone

> On 19 Aug 2022, at 5:45 PM, sandra sukumaran  
> wrote:
> 
> 
> Dear Sir,
> 
> 
> 
>  Is there any possible method to fetch MySQL database bin log, with the 
> help of spark streaming.
> Kafka streaming is not applicable in this case.
> 
> 
> 
> Thanks and regards
> Sandra


Spark streaming

2022-08-19 Thread sandra sukumaran
Dear Sir,



 Is there any possible method to fetch MySQL database bin log, with the
help of spark streaming.
Kafka streaming is not applicable in this case.



Thanks and regards
Sandra