databricks / Spark-The-Definitive-Guide

Spark: The Definitive Guide's Code Repository
http://shop.oreilly.com/product/0636920034957.do
Other
2.85k stars 2.76k forks source link

chap3 - streaming write results in console #32

Open maelfosso opened 5 years ago

maelfosso commented 5 years ago

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

bllchmbrs commented 5 years ago

Are you running this on your laptop/desktop computer ?

maelfosso commented 5 years ago

@anabranch I'm running it on my laptop.

Is there anything I forget to install ?

bllchmbrs commented 5 years ago

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.