spark-notebook

How to stop a notebook streaming job gracefully?

泪湿孤枕 提交于 2020-04-16 13:51:46
问题 I have a streaming application which is running into a Databricks notebook job (https://docs.databricks.com/jobs.html). I would like to be able to stop the streaming job gracefully using the stop() method of the StreamingQuery class which is returned by the stream.start() method. That of course requires to either have access to the mentioned streaming instance or to access the context of the running job itself. In this second case the code could look as next: spark.sqlContext.streams.get(

recursive cte in spark SQL

大憨熊 提交于 2020-01-25 05:22:24
问题 ; WITH Hierarchy as ( select distinct PersonnelNumber , Email , ManagerEmail from dimstage union all select e.PersonnelNumber , e.Email , e.ManagerEmail from dimstage e join Hierarchy as h on e.Email = h.ManagerEmail ) select * from Hierarchy Can you help acheive the same in SPARK SQL 回答1: This is not possible using SPARK SQL. The WITH clause exists, but not for CONNECT BY like in, say, ORACLE, or recursion in DB2. 来源: https://stackoverflow.com/questions/52562607/recursive-cte-in-spark-sql

recursive cte in spark SQL

别来无恙 提交于 2020-01-25 05:21:45
问题 ; WITH Hierarchy as ( select distinct PersonnelNumber , Email , ManagerEmail from dimstage union all select e.PersonnelNumber , e.Email , e.ManagerEmail from dimstage e join Hierarchy as h on e.Email = h.ManagerEmail ) select * from Hierarchy Can you help acheive the same in SPARK SQL 回答1: This is not possible using SPARK SQL. The WITH clause exists, but not for CONNECT BY like in, say, ORACLE, or recursion in DB2. 来源: https://stackoverflow.com/questions/52562607/recursive-cte-in-spark-sql

dynamic interactive dashboard with zeppelin notebook

点点圈 提交于 2019-12-24 08:01:14
问题 I want to have a more interactive dashboard. like reading the data from database , giving it to select box, onchange of select box send the value and run the query. i want to achieve this using zeppelin bcz on selected value i have to display the analytics. what would be the way to achieve this and is this possible to achieve through zeppelin. i tried with select box, but i couldnot save the selected value and send it to next query and execute that. something like select age, count(1) value