You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The demo uses few environment variables, create and load it,
22
+
23
+
```shell
24
+
copy $DEMO_HOME/.envrc.example $DEMO_HOME/.envrc
25
+
```
26
+
27
+
> **NOTE**: `$DEMO_HOME` is the directory where you have cloned this repo
28
+
29
+
Adjust the values in the `$DEMO_HOME/.envrc` as per your requirements and load them,
30
+
31
+
```shell
32
+
direnv allow .
33
+
```
34
+
19
35
## Data Streaming Platform Setup
20
36
21
37
The entire demo is containerized and all the applications could be started using the Docker compose,
@@ -119,12 +135,31 @@ Once the task is added the terminal running the client should show an output sim
119
135
```
120
136
121
137
> **TIP**: If you have downloaded the `add` binary then you can use it send Todo Tasks. Check `add -h` for possible options.
138
+
> Add Todos from the file `$DEMO_HOME/samples/todos.jsonl`
139
+
>
140
+
> ```json
141
+
> {"title": "Learn Redpanda CLI", "description": "Learn how to use rpk cli.","category": "learning","status": false}
142
+
> {"title": "Learn Snowflake and Streamlit", "description": "Learn how to integrate snowflake with streamlit.",> "category": "learning","status": false}
The added `todos` can ve viewed via the Redpanda [Web Console](http://localhost:8080).
122
155
123
156
## Snowflake Integration
124
157
125
158
The following section details on steps required to integrate the application with Snowflake data cloud. As result of the integration the data from Redpanda topic `todo-list` gets synchronized on to Snowflake table `TODO_LIST`.
126
159
127
-
### Create RSA Key Pair
160
+
### RSA Key Pair
161
+
162
+
The `$TODOAPP_USER` will be using the Private Key authentication. In the following section we will create a RSA Private Key and encrypt the same.
128
163
129
164
Create directory to hold the keys,
130
165
@@ -166,31 +201,54 @@ end
166
201
Export the Private Key and Public Key into variables,
**Optionally** you can run the following command to find the number of todos that has been inserted, it should return`7`.
318
380
319
381
```shell
320
382
snowsql -u $TODOAPP_USER \
321
383
--private-key-path="$DEMO_HOME/keys/rsa_key.p8" \
384
+
--warehouse $SNOWSQL_WAREHOUSE \
322
385
--dbname $TODOAPP_DATABASE \
323
386
--query "SELECT count(*) from TODO_LIST;"
324
387
```
@@ -327,6 +390,43 @@ snowsql -u $TODOAPP_USER \
327
390
328
391
You can now use the synchronized data to build a dashboard using [Streamlit](https://streamlit.io). The demo builds a simple dashboard that shows task by category along with a tabular representation of the tasks data.
329
392
393
+
#### Create the Stored Procedure
394
+
395
+
Stored Procedure to extract the data the table synchronized with Redpanda topic to any custom table.
0 commit comments