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
- Fix frontmatter tags to use allowed values (Data API, Connector,
SQL++ (N1QL), FTS, REST API) and stay within the 6-tag limit
- Remove 0.0.0.0/0 suggestion from Capella setup, add security note
guiding users to find their actual IP instead
- Add parameterized query example ($country) in Step 3 demonstrating
safe SQL++ parameter binding via the args field
- Remove parameterized queries from "Next Steps" since now covered
- Pin Docker images to specific versions (couchbase:7.6.2,
tooljet/tooljet-ce:v3.16.0-LTS) for tutorial reproducibility
Copy file name to clipboardExpand all lines: tutorial/markdown/connectors/tooljet/tooljet-couchbase-airline-dashboard.md
+34-9Lines changed: 34 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,11 @@ technology:
15
15
- query
16
16
- fts
17
17
tags:
18
-
- ToolJet
19
-
- Low-Code
20
18
- Data API
21
19
- Connector
22
-
- Internal Tools
23
-
- SQL++
24
-
- Full-Text Search
20
+
- SQL++ (N1QL)
21
+
- FTS
22
+
- REST API
25
23
sdk_language:
26
24
- nodejs
27
25
length: 30 Mins
@@ -74,7 +72,8 @@ Couchbase Capella is the easiest way to get started. It has a free tier and the
74
72
- Note down the **username** and **password**
75
73
4.**Allow network access**:
76
74
- Go to **Allowed IP Addresses**
77
-
- Add the IP address of your ToolJet instance (or `0.0.0.0/0` for testing)
75
+
- Add the IP address of your ToolJet instance (visit [whatismyip.com](https://whatismyip.com) to find your public IP if self-hosting)
76
+
> **Security Note**: Never allow `0.0.0.0/0` (all IPs). Always restrict access to specific IP addresses, even in development.
78
77
5.**Find your Data API endpoint**:
79
78
- Go to **Connect** tab
80
79
- Look for the **Data API** endpoint URL — it will look like `https://<cluster-id>.data.cloud.couchbase.com`
@@ -94,7 +93,7 @@ docker run -d --name couchbase-server \
94
93
-p 8091-8096:8091-8096 \
95
94
-p 11210-11211:11210-11211 \
96
95
-p 18091-18096:18091-18096 \
97
-
couchbase:latest
96
+
couchbase:7.6.2
98
97
```
99
98
100
99
2.**Initialize the cluster**:
@@ -131,7 +130,7 @@ docker run -d --name couchbase-server \
131
130
docker run -d \
132
131
--name tooljet \
133
132
-p 80:80 \
134
-
tooljet/tooljet-ce:latest
133
+
tooljet/tooljet-ce:v3.16.0-LTS
135
134
```
136
135
137
136
Open `http://localhost` and create your admin account.
@@ -215,6 +214,33 @@ You should see results in the preview panel — a list of airlines with their na
215
214
216
215
> **How it works**: This SQL++ query runs against the `airline` collection inside the `inventory` scope of the `travel-sample` bucket. `META().id` gives us the document ID, which we'll need for CRUD operations later.
217
216
217
+
### Using Parameterized Queries
218
+
219
+
Now let's create a second query that uses **parameterized arguments** — this is the recommended way to pass dynamic values in SQL++ because it prevents injection attacks.
220
+
221
+
1. Create another query named `listAirlinesByCountry`
222
+
2. Configure it:
223
+
-**Operation**: **Query**
224
+
-**SQL++ Query**:
225
+
226
+
```sql
227
+
SELECT META().id AS doc_id, name, country, callsign, iata, icao
228
+
FROM`travel-sample`.`inventory`.`airline`
229
+
WHERE country = $country
230
+
ORDER BY name
231
+
LIMIT50
232
+
```
233
+
234
+
-**Arguments (Key-Value)**:
235
+
236
+
```json
237
+
{ "$country": "United States" }
238
+
```
239
+
240
+
3. Click **Run** — you should see only airlines from the United States
241
+
242
+
> **Why parameterized queries?** Instead of concatenating user input directly into SQL++ strings (which risks injection attacks), Couchbase's `$parameter` syntax sends values separately from the query statement. The plugin passes these through the `args` field in the Data API request body. You can also pass **Query Options** like `{ "readonly": true, "timeout": "30s" }` for additional control.
243
+
218
244
## Step 4: Display Airlines in a Table
219
245
220
246
1. From the **Components** panel (right sidebar), drag a **Table** component onto the canvas
@@ -443,7 +469,6 @@ You've built a complete Airline Dashboard that demonstrates all 6 Couchbase oper
443
469
### Next Steps
444
470
445
471
-**Add vector search**: Replace the FTS match query with a vector search query for semantic/AI-powered search
446
-
-**Add parameterized queries**: Use `$parameter` syntax in SQL++ for advanced filtering
447
472
-**Build more apps**: Customer support tools, inventory managers, reporting dashboards — all on your Couchbase data
448
473
-**Explore ToolJet components**: Charts, maps, JSON viewers, and 50+ other widgets can visualize your Couchbase data in different ways
0 commit comments