Spark-The-Definitive-Guide icon indicating copy to clipboard operation
Spark-The-Definitive-Guide copied to clipboard

chap3 - streaming write results in console

Open maelfosso opened this issue 7 years ago • 3 comments

Hi,

I start learning Apache Spark by reading that book. I'm now at chapter 3 - Streaming part. For snippet code, I choose python3 My problem is that nothing is displayed in console, as said in the book, from that code

purchaseByCustomerPerHour.writeStream \
    .format("console") \
    .queryName("customer_purchases_3") \
    .outputMode("complete") \
    .start() \
    .show() 

I don't know if I'm doing something wrong but tell me how to display result in console at start and at every update too

maelfosso avatar Oct 26 '18 04:10 maelfosso

Are you running this on your laptop/desktop computer ?

bllchmbrs avatar Oct 26 '18 16:10 bllchmbrs

@anabranch I'm running it on my laptop.

Is there anything I forget to install ?

maelfosso avatar Nov 02 '18 17:11 maelfosso

Is it in a notebook of some sort or just in the terminal?

I would recommend running all the code again, you should definitely see it. This has never been reported before and I know a lot of people have run it so it's likely something you're doing. If you can provide more specifics about what you're doing, I can help more but with the information you're providing me I don't have much to go off of.

bllchmbrs avatar Nov 02 '18 20:11 bllchmbrs