Skip to content

Commit 4bee2e0

Browse files
authored
QA webinar with KV Lite (#194)
1 parent 0d471c0 commit 4bee2e0

File tree

7 files changed

+32
-33
lines changed

7 files changed

+32
-33
lines changed

Diff for: demo-events/webinar/demo-nosql-lab-with-kvlite/create-populate-tables/create-populate-tables.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Which data model you use depends on your business model. Oracle NoSQL Database
2222
1. Execute the following in your Shell.
2323
```
2424
<copy>
25-
KV_VERSION=21.2.46
25+
KV_VERSION=24.3.9
2626
KVHOME=$HOME/kv-$KV_VERSION
27-
cd ~/demo-lab-nosql-kvlite
27+
cd ~/demo-lab-nosql-kvlite
2828
</copy>
2929
```
3030
@@ -61,6 +61,7 @@ Which data model you use depends on your business model. Oracle NoSQL Database
6161
</copy>
6262
```
6363
3. View the description of both the tables created.
64+
6465
```
6566
<copy>
6667
show tables
@@ -77,7 +78,9 @@ Which data model you use depends on your business model. Oracle NoSQL Database
7778
describe table demoKeyVal;
7879
</copy>
7980
```
81+
8082
4. Load data into the `demo` table using the data file `baggage_data_file0.json`.
83+
8184
```
8285
<copy>
8386
put -table demo -file objects/baggage_data_file0.json
@@ -96,6 +99,7 @@ Which data model you use depends on your business model. Oracle NoSQL Database
9699
```
97100
This is because the structure of the data files `baggage_data_file0-value.json` and `baggage_data_file0.json` are very different. The data file `baggage_data_file0-value.json` has the JSON document inside the **value** field. But the demo table expects the ticketNo which is the primary key as a separate field. Thats why you get the error that the primary key is empty.
98101
5. Load data into the `demoKeyVal` table using the data file `baggage_data_file0.json`.
102+
99103
```
100104
<copy>
101105
put -table demoKeyVal -file objects/baggage_data_file0.json
@@ -104,7 +108,9 @@ Which data model you use depends on your business model. Oracle NoSQL Database
104108
You get a success message saying one row is inserted. If you view the data that got inserted , you will see that there was a NULL inserted into the JSON document.
105109
```
106110
Loaded 1 row to table demoKeyVal
107-
sql-> select * from demoKeyVal;
111+
<copy>
112+
select * from demoKeyVal;
113+
</copy>
108114
{"key":1,"value":null}
109115
```
110116
The reason is that the data file `baggage_data_file0.json` has the static field and then a JSON column but the `demoKeyVal` table expects all information inside a "Value" field. Since this is a JSON document, the put statement does not fail , rather it succeeds and inserts a NULL JSON.
@@ -117,6 +123,7 @@ Which data model you use depends on your business model. Oracle NoSQL Database
117123
This is successful and the JSON document gets inserted as there is a perfect match between the format in the datafile and what the `demoKeyVal` table expects.
118124
119125
6. View the data that you populated in both the tables. Fetch the data from `demoKeyVal` table when it is NULL and NOT NULL. This explains that both NULL and NOT NULL JSON documents gor inserted into the `demoKeyVal` table.
126+
120127
```
121128
<copy>
122129
mode json -pretty;

Diff for: demo-events/webinar/demo-nosql-lab-with-kvlite/explore-run-queries/explore-run-queries.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,30 @@ Estimated Time: 15 minutes
4444
````
4545
4646
4. You can run a query by ticket number and passengers on a flight. Execute in your Shell. Each of these produced slightly different results.
47+
4748
* Displays the document with a specific ticket number
49+
4850
````
4951
<copy>
5052
curl -X GET http://localhost:3500/getBagInfoByTicketNumber?ticketNo=1762322446040 | jq
5153
</copy>
5254
````
5355
* Displays all the records
56+
5457
````
5558
<copy>
5659
curl -X GET http://localhost:3500/getBagInfoByTicketNumber | jq
5760
</copy>
5861
````
5962
* Displays a count of the records.
63+
6064
````
6165
<copy>
6266
curl -X GET http://localhost:3500/getBagInfoByTicketNumber | jq '. | length'
6367
</copy>
6468
````
6569
* For the below command, you can see in the field "message" the getPassengersAffectedByFlight endpoint is still under construction. In other words the code for that endpoint has not been completed yet.
70+
6671
````
6772
<copy>
6873
curl -X GET http://localhost:3500/getPassengersAffectedByFlight?flightNo=BM715 | jq
@@ -75,7 +80,7 @@ Estimated Time: 15 minutes
7580
7681
````
7782
<copy>
78-
KV_VERSION=21.2.46
83+
KV_VERSION=24.3.9
7984
KVHOME=$HOME/kv-$KV_VERSION
8085
cd ~/demo-lab-nosql-kvlite/
8186
java -jar $KVHOME/lib/sql.jar -helper-hosts localhost:5000 -store kvstore
@@ -143,15 +148,6 @@ Estimated Time: 15 minutes
143148
5. Type in **exit** to exit from the CLI application.
144149
145150
146-
## Learn More
147-
148-
149-
* [Oracle NoSQL Database page](https://www.oracle.com/database/nosql-cloud.html)
150-
* [Java API Reference Guide](https://docs.oracle.com/en/cloud/paas/nosql-cloud/csnjv/index.html)
151-
* [Node API Reference Guide](https://oracle.github.io/nosql-node-sdk/)
152-
* [Python API Reference Guide](https://nosql-python-sdk.readthedocs.io/en/latest/index.html)
153-
154-
155151
## Acknowledgements
156152
* **Author** - Dario Vega, Product Manager, NoSQL Product Management and Michael Brey, Director, NoSQL Product Development
157153
* **Last Updated By/Date** - Vandana Rajamani, Principal UA Developer, Oracle NoSQL Database, May 2022

Diff for: demo-events/webinar/demo-nosql-lab-with-kvlite/setup-environment/setup-environment.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ This lab assumes you have:
2424

2525
## Task 1: Download Oracle NoSQL CE
2626

27-
In this lab you will be using the 20.3.19 version of the Community Edition of Oracle NoSQL Database. You download the file and unzip and extract the contents.
27+
In this lab you will be using the 24.3.9 version of the Community Edition of Oracle NoSQL Database. You download the file and unzip and extract the contents.
2828
````
2929
<copy>
30-
KV_VERSION=21.2.46
30+
KV_VERSION=24.3.9
3131
rm -rf kv-$KV_VERSION
3232
DOWNLOAD_ROOT=http://download.oracle.com/otn-pub/otn_software/nosql-database
3333
DOWNLOAD_FILE="kv-ce-${KV_VERSION}.zip"
3434
DOWNLOAD_LINK="${DOWNLOAD_ROOT}/${DOWNLOAD_FILE}"
35-
curl -OL $DOWNLOAD_LINK
36-
unzip $DOWNLOAD_FILE
35+
curl -OLs $DOWNLOAD_LINK
36+
jar tf $DOWNLOAD_FILE | grep "kv-$KV_VERSION/lib" > extract.libs
37+
jar xf $DOWNLOAD_FILE @extract.libs
38+
rm -f $DOWNLOAD_FILE extract.libs
3739
KVHOME=$PWD/kv-$KV_VERSION
3840
</copy>
3941
````

Diff for: demo-events/webinar/tv-streaming-service-queries/create-populate-tables/create-populate-tables.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Estimated Time: 15 minutes
1919
1. Execute the following in your Shell.
2020
```
2121
<copy>
22-
KV_VERSION=23.3.32
22+
KV_VERSION=24.3.9
2323
KVHOME=$HOME/kv-$KV_VERSION
2424
</copy>
2525
```
@@ -170,8 +170,8 @@ The java driver can be downloaded from [here](https://github.com/oracle/nosql-ja
170170
```
171171
<copy>
172172
cd ~/oracle-nosql-arrays
173-
curl -OL https://github.com/oracle/nosql-java-sdk/releases/download/v5.4.15/oracle-nosql-java-sdk-5.4.15.zip
174-
unzip oracle-nosql-java-sdk-5.4.15.zip
173+
curl -OL https://github.com/oracle/nosql-java-sdk/releases/download/v5.4.16/oracle-nosql-java-sdk-5.4.16.zip
174+
unzip oracle-nosql-java-sdk-5.4.16.zip
175175
</copy>
176176
```
177177

Diff for: demo-events/webinar/tv-streaming-service-queries/explore-run-queries/explore-run-queries.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Execute the following in your Shell. You are invoking the sql command line to ex
1818

1919
```
2020
<copy>
21-
KV_VERSION=23.3.32
21+
KV_VERSION=24.3.9
2222
KVHOME=$HOME/kv-$KV_VERSION
2323
2424
cd ~/oracle-nosql-arrays
@@ -487,13 +487,6 @@ in descending order.
487487
488488
The query uses `idx_showid_seasonNum_minWatched` as a covering index.
489489
490-
## Learn More
491-
492-
493-
* [Oracle NoSQL Database page](https://www.oracle.com/database/nosql-cloud.html)
494-
* [Java API Reference Guide](https://docs.oracle.com/en/cloud/paas/nosql-cloud/csnjv/index.html)
495-
* [NoSQL SQL Reference Manual](https://docs.oracle.com/en/database/other-databases/nosql-database/24.1/sqlreferencefornosql/sql-reference-guide.pdf)
496-
497490
498491
## Acknowledgements
499492
* **Author** - Markos Zaharioudakis, Software Architect, NoSQL Product Development

Diff for: demo-events/webinar/tv-streaming-service-queries/setup-environment/setup-environment.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ In this lab you will be using the 20.3.19 version of the Community Edition of Or
2828
NoSQL Database. You download the file and unzip and extract the contents.
2929
````
3030
<copy>
31-
KV_VERSION=23.3.32
31+
KV_VERSION=24.3.9
3232
rm -rf kv-$KV_VERSION
3333
DOWNLOAD_ROOT=http://download.oracle.com/otn-pub/otn_software/nosql-database
34-
DOWNLOAD_FILE="community-edition-${KV_VERSION}.zip"
34+
DOWNLOAD_FILE="kv-ce-${KV_VERSION}.zip"
3535
DOWNLOAD_LINK="${DOWNLOAD_ROOT}/${DOWNLOAD_FILE}"
36-
curl -OL $DOWNLOAD_LINK
37-
unzip $DOWNLOAD_FILE
38-
rm $DOWNLOAD_FILE
36+
curl -OLs $DOWNLOAD_LINK
37+
jar tf $DOWNLOAD_FILE | grep "kv-$KV_VERSION/lib" > extract.libs
38+
jar xf $DOWNLOAD_FILE @extract.libs
39+
rm -f $DOWNLOAD_FILE extract.libs
3940
KVHOME=$PWD/kv-$KV_VERSION
4041
</copy>
4142
````

0 commit comments

Comments
 (0)