unsubscribeStreamingSQL

Syntax

unsubscribeStreamingSQL([server], queryId)

Arguments

server (optional) A STRING scalar representing the alias or remote connection handle of the node running streaming SQL query (i.e., the server where the query was registered). If not specified or an empty string, the server hosting the query is the local instance.

queryId A STRING scalar representing the ID name for the streaming SQL query to unsubscribe.

Details

Unsubscribe from the results of a specified streaming SQL query. After unsubscribing, the subscriber's real-time result table stops updating.

Return value: None.

Examples

t=table(1..10 as id,rand(100,10) as val)
share t as st
declareStreamingSQLTable(st)
registerStreamingSQL("select avg(val) from st","sql_avg") 

subscribeStreamingSQL(queryId="sql_avg")
// output: 52.1

unsubscribeStreamingSQL(queryId="sql_avg")

Related functions: declareStreamingSQLTable, registerStreamingSQL, subscribeStreamingSQL