Skip to content

Conversation

@amotl
Copy link
Member

@amotl amotl commented Sep 14, 2025

@coderabbitai
Copy link

coderabbitai bot commented Sep 14, 2025

Warning

Rate limit exceeded

@amotl has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 49 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3c1eaf0 and e0c8e9d.

📒 Files selected for processing (2)
  • docs/integrate/node-red/index.md (3 hunks)
  • docs/integrate/node-red/mqtt-tutorial.md (1 hunks)

Walkthrough

Adds a new Node‑RED MQTT ingestion tutorial page and integrates it into the Node‑RED docs index by replacing an external tutorial URL with an internal reference and adding hidden toctree entries for the tutorial.

Changes

Cohort / File(s) Summary
Node‑RED docs index integration
docs/integrate/node-red/index.md
Replaced a hard-coded external MQTT tutorial URL with an internal node-red-tutorial reference and inserted hidden toctree entries referencing the new tutorial.
New MQTT tutorial page
docs/integrate/node-red/mqtt-tutorial.md
Added a detailed tutorial for ingesting MQTT messages into CrateDB using Node‑RED: prerequisites, producer/consumer flows, example flow JSON, table schema (nodered_target), batching/multi-value INSERT guidance, testing steps, and external links.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant NP as Node-RED Producer
    participant MB as MQTT Broker
    participant NC as Node-RED Consumer
    participant CD as CrateDB

    U->>NP: Trigger Inject (JSON payload)
    NP-->>MB: Publish MQTT message

    MB-->>NC: Deliver MQTT messages
    NC->>NC: Batch messages (time/window)
    NC->>NC: Function node: build multi-value INSERT tuples
    NC->>CD: PostgreSQL node: INSERT INTO nodered_target (...)
    CD-->>NC: ACK/Result
    NC-->>U: Ingestion complete (verify via SELECT)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • crate/crate-clients-tools#269 — Adds missing MQTT/Node‑RED integration content under docs/integrate, which this PR provides.

Possibly related PRs

Suggested labels

sanding-1200, cross linking, guidance

Suggested reviewers

  • karynzv
  • surister

Poem

Hop, hop—new docs take flight,
From broker’s buzz to SQL’s light.
Packets batch, tables sing,
OBJECT fields hold everything.
Node‑RED flows, CrateDB writes—🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "Node-RED: MQTT tutorial" is a concise, single-sentence summary that directly reflects the main change (adding a Node-RED MQTT MQTT tutorial and updating the docs to reference it), and it is specific enough for a teammate scanning history to understand the primary change.
Description Check ✅ Passed The PR description clearly states the objective (adding tutorials from the community forum), provides a preview link, and references an issue, so it is directly related to the changeset and not off-topic.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@amotl
Copy link
Member Author

amotl commented Sep 16, 2025

@coderabbitai review and please convert all spots to active voice.

@amotl amotl marked this pull request as ready for review September 16, 2025 18:23
@coderabbitai
Copy link

coderabbitai bot commented Sep 16, 2025

@amotl I'll review the PR and focus on converting passive voice to active voice throughout the documentation. Based on my previous learnings about documentation reviews, I'll identify passive constructions and suggest active voice alternatives to make the content more direct and engaging.


🧠 Learnings used
Learnt from: amotl
PR: crate/cratedb-guide#0
File: :0-0
Timestamp: 2025-09-15T17:42:25.449Z
Learning: When reviewing documentation, use active voice instead of first-person or passive voice, and emit corresponding suggestions.
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@amotl amotl added the reorganize Moving content around, inside and between other systems. label Sep 16, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (6)
docs/integrate/node-red/mqtt-tutorial.md (6)

4-6: Rewrite intro in active voice and simplify phrasing.

Apply this diff:

-[Node-RED](https://nodered.org/) is a workflow automation tool allowing to orchestrate message flows and transformations via a comfortable web interface.
-In this article, we will demonstrate the usage of Node-RED with CrateDB at the example of reading messages from an MQTT broker and inserting them into CrateDB.
+[Node-RED](https://nodered.org/) is a workflow automation tool that lets you orchestrate message flows and transformations through a web interface.
+This tutorial shows how to read messages from an MQTT broker with Node-RED and insert them into CrateDB.

8-12: Tighten prerequisites and switch to active voice.

-To follow this article, you will need:
+You need:
 1. A running [Node-RED installation](https://nodered.org/#get-started)
-2. An installed [node-red-contrib-postgresql](https://github.com/alexandrainst/node-red-contrib-postgresql) module
-3. A running MQTT broker. We are using [HiveMQ Cloud](https://www.hivemq.com/) for this test setup.
+2. The [node-red-contrib-postgresql](https://github.com/alexandrainst/node-red-contrib-postgresql) module installed
+3. A running MQTT broker. This tutorial uses [HiveMQ Cloud](https://www.hivemq.com/).

15-23: Make “Producing data” section active and clarify wording; format node name.

-First, we will generate data that populates the MQTT topic using Node-RED. If you already have an MQTT topic with regular messages, you can skip this part.
+First, generate data to populate the MQTT topic with Node-RED. If you already have an MQTT topic with regular messages, you can skip this part.
@@
-The inject node is creating a JSON payload with three different attributes:
+The `inject` node creates a JSON payload with three attributes:
@@
-For the sake of this example, two of them are static and only the timestamp will change.
-Here is the full workflow definition: [flows-producer.json](https://community.cratedb.com/uploads/short-url/eOvAk3XzDkRbNZjcZV0pZ0SnGu4.json) (1.3 KB)
+In this example, two fields are static; only the timestamp changes.
+Download the full workflow definition: [flows-producer.json](https://community.cratedb.com/uploads/short-url/eOvAk3XzDkRbNZjcZV0pZ0SnGu4.json) (1.3 KB)

34-34: Use active voice and point to “latest” docs for OBJECT type.

-The payload makes use of CrateDB’s [OBJECT data type](https://crate.io/docs/crate/reference/en/4.6/general/ddl/data-types.html#object) that is a perfect fit for payloads with a schema that will likely evolve over time. For productive usage, [partitioning and sharding](https://community.cratedb.com/t/sharding-and-partitioning-guide-for-time-series-data/737) should be considered as well.
+Store the payload as CrateDB’s [OBJECT data type](https://crate.io/docs/crate/reference/en/latest/general/ddl/data-types.html#object) to accommodate an evolving schema. For production, also consider [partitioning and sharding](https://community.cratedb.com/t/sharding-and-partitioning-guide-for-time-series-data/737).

48-49: Prefer active voice and reduce “Here is …”.

-Here is the full workflow definition: [flows-consumer.json](https://community.cratedb.com/uploads/short-url/vWxIENgDPhYnoTZuQC7DKJoNdyY.json) (2.6 KB)
+Download the full workflow definition: [flows-consumer.json](https://community.cratedb.com/uploads/short-url/vWxIENgDPhYnoTZuQC7DKJoNdyY.json) (2.6 KB)

50-58: Active voice in Testing; minor phrasing tweaks.

-To test the workflow, you can click on the rectangle left to the timestamp node (![Screenshot 2021-09-13 at 14.24.50|70x68, 40%](https://us1.discourse-cdn.com/flex020/uploads/crate/original/1X/d3e06521d875fe2daa959b3adc9f5bf6a22453e7.png){w=30px}) to inject a message. In the provided configuration, an INSERT statement will be triggered after two messages have been injected or ten seconds after the first message, if no second message follows.
+To test the workflow, click the square to the left of the timestamp node (![Screenshot 2021-09-13 at 14.24.50|70x68, 40%](https://us1.discourse-cdn.com/flex020/uploads/crate/original/1X/d3e06521d875fe2daa959b3adc9f5bf6a22453e7.png){w=30px}) to inject a message. In this configuration, an INSERT triggers after two messages or after ten seconds if a second message does not arrive.
@@
-Run a SELECT statement on your CrateDB cluster to see the inserted rows:
+Then run a SELECT statement on your CrateDB cluster to see the inserted rows:
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 591e346 and 0d7eb2c.

📒 Files selected for processing (2)
  • docs/integrate/node-red/index.md (2 hunks)
  • docs/integrate/node-red/mqtt-tutorial.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build docs
🔇 Additional comments (3)
docs/integrate/node-red/index.md (2)

59-63: Good change: use internal ref instead of external URL.

Switching to :link-type: ref improves maintainability and works with intersphinx builds.


78-83: Hidden toctree entry looks good.

The page will be discoverable in builds without cluttering the sidebar. No action needed.

docs/integrate/node-red/mqtt-tutorial.md (1)

26-33: Active voice for table creation intro.
[raise_n​inor_issue]

-First of all, we create the target table in CrateDB:
+First, create the target table in CrateDB:

Copy link
Member

@kneth kneth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (but didn't test)

@amotl amotl merged commit 23b6697 into main Sep 19, 2025
3 checks passed
@amotl amotl deleted the node-red branch September 19, 2025 21:24
@amotl
Copy link
Member Author

amotl commented Sep 19, 2025

Thanks. We think all of the newly added tutorials should work reasonably, as they have been conceived by trustful authors, and also pretty recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reorganize Moving content around, inside and between other systems.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants