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
Copy file name to clipboardExpand all lines: demo-events/webinar/demo-nosql-lab-with-kvlite/create-populate-tables/create-populate-tables.md
+10-3
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,9 @@ Which data model you use depends on your business model. Oracle NoSQL Database
22
22
1. Execute the following in your Shell.
23
23
```
24
24
<copy>
25
-
KV_VERSION=21.2.46
25
+
KV_VERSION=24.3.9
26
26
KVHOME=$HOME/kv-$KV_VERSION
27
-
cd ~/demo-lab-nosql-kvlite
27
+
cd ~/demo-lab-nosql-kvlite
28
28
</copy>
29
29
```
30
30
@@ -61,6 +61,7 @@ Which data model you use depends on your business model. Oracle NoSQL Database
61
61
</copy>
62
62
```
63
63
3. View the description of both the tables created.
64
+
64
65
```
65
66
<copy>
66
67
show tables
@@ -77,7 +78,9 @@ Which data model you use depends on your business model. Oracle NoSQL Database
77
78
describe table demoKeyVal;
78
79
</copy>
79
80
```
81
+
80
82
4. Load data into the `demo` table using the data file `baggage_data_file0.json`.
83
+
81
84
```
82
85
<copy>
83
86
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
96
99
```
97
100
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.
98
101
5. Load data into the `demoKeyVal` table using the data file `baggage_data_file0.json`.
102
+
99
103
```
100
104
<copy>
101
105
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
104
108
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.
105
109
```
106
110
Loaded 1 row to table demoKeyVal
107
-
sql-> select * from demoKeyVal;
111
+
<copy>
112
+
select * from demoKeyVal;
113
+
</copy>
108
114
{"key":1,"value":null}
109
115
```
110
116
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
117
123
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.
118
124
119
125
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.
Copy file name to clipboardExpand all lines: demo-events/webinar/demo-nosql-lab-with-kvlite/explore-run-queries/explore-run-queries.md
+6-10
Original file line number
Diff line number
Diff line change
@@ -44,25 +44,30 @@ Estimated Time: 15 minutes
44
44
````
45
45
46
46
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
+
47
48
* Displays the document with a specific ticket number
49
+
48
50
````
49
51
<copy>
50
52
curl -X GET http://localhost:3500/getBagInfoByTicketNumber?ticketNo=1762322446040 | jq
51
53
</copy>
52
54
````
53
55
* Displays all the records
56
+
54
57
````
55
58
<copy>
56
59
curl -X GET http://localhost:3500/getBagInfoByTicketNumber | jq
57
60
</copy>
58
61
````
59
62
* Displays a count of the records.
63
+
60
64
````
61
65
<copy>
62
66
curl -X GET http://localhost:3500/getBagInfoByTicketNumber | jq '. | length'
63
67
</copy>
64
68
````
65
69
* 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
+
66
71
````
67
72
<copy>
68
73
curl -X GET http://localhost:3500/getPassengersAffectedByFlight?flightNo=BM715 | jq
Copy file name to clipboardExpand all lines: demo-events/webinar/demo-nosql-lab-with-kvlite/setup-environment/setup-environment.md
+6-4
Original file line number
Diff line number
Diff line change
@@ -24,16 +24,18 @@ This lab assumes you have:
24
24
25
25
## Task 1: Download Oracle NoSQL CE
26
26
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.
0 commit comments