createStreamGraph
Syntax
createStreamGraph(name)
Arguments
name is a string representing the name of the stream graph. You can provide either the fully qualified name (FQN), such as "catalog_name.orca_graph.graph_name", or just the graph name, like "factors". If only the name is given, the system will automatically complete it using the current catalog.
Details
Creates a declarative stream graph. It supports the following capabilities:
- Lifecycle management: Initialize, execute, and terminate the stream graph.
- Configuration: Set parameters for subscriptions and private stream tables.
- Data source definition: Define sources including persisted stream tables, high-availability stream tables, and streaming engines.
Return value: A StreamGraph object.
Examples
Create a stream graph named “indicators”.
if (!existsCatalog("orca")) {
createCatalog("orca")
}
go
use catalog orca
g = createStreamGraph("indicators")