-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Abhinav Gyawali <[email protected]>
- Loading branch information
Showing
4 changed files
with
65 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
CREATE TABLE times ( | ||
count INT NOT NULL, | ||
ts TIMESTAMP NOT NULL | ||
) with ( | ||
'connectors' = '[{ | ||
"transport": { | ||
"name": "datagen", | ||
"config": { | ||
"plan": [{ | ||
"rate": 100, | ||
"fields": { | ||
"ts": { "range": ["2025-01-22T00:00:00Z", "2025-01-31T00:00:02Z"], "scale": 1000 } | ||
} | ||
}] | ||
} | ||
} | ||
}]' | ||
); | ||
|
||
CREATE MATERIALIZED VIEW v0 AS SELECT * FROM times; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
feldera |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This script uses the Feldera API to create and start a pipeline using SQL | ||
# program in 'test.sql'. | ||
|
||
from feldera import FelderaClient, PipelineBuilder | ||
|
||
sql = open("grafana.sql").read() | ||
|
||
client = FelderaClient('http://localhost:8080') | ||
|
||
print('Starting pipeline') | ||
pipeline = PipelineBuilder(client, 'grafana', sql).create_or_replace() | ||
pipeline.start() |