docs: document Execute Query parameters for Azure Cosmos DB node#4636
Open
strzeluk wants to merge 1 commit into
Open
docs: document Execute Query parameters for Azure Cosmos DB node#4636strzeluk wants to merge 1 commit into
strzeluk wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Deploy Preview for n8n-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
No issues found across 1 file
Architecture diagram
sequenceDiagram
participant UI as n8n UI (Node Editor)
participant Workflow as n8n Workflow Engine
participant CosmosDB as Azure Cosmos DB SDK
participant Azure as Azure Cosmos DB API
Note over UI,Azure: Execute Query Node Flow
UI->>Workflow: Configure node with Query & Options
alt Query Parameters (comma-separated string)
UI->>Workflow: Query: "SELECT * FROM c WHERE c.status = $1 AND c.startDate = $2"
UI->>Workflow: Query Parameters: "active,2024"
Workflow->>Workflow: Convert $N to @ParamN placeholders
Workflow->>Workflow: Parse comma-separated string → array of strings: ["active", "2024"]
Workflow->>CosmosDB: Execute query with parameters (all string typed)
CosmosDB->>Azure: SQL query + @Param1="active", @Param2="2024"
Azure-->>CosmosDB: Results (type-sensitive comparison may fail for numeric fields)
else Query Parameters (JSON)
UI->>Workflow: Query: "SELECT * FROM c WHERE c.startDate = $1 AND c.code = $2"
UI->>Workflow: Query Parameters (JSON): "[1737062400000, \"01234\"]"
Workflow->>Workflow: Convert $N to @ParamN placeholders
Workflow->>Workflow: Parse JSON array → typed values: [1737062400000 (number), "01234" (string)]
Workflow->>CosmosDB: Execute query with typed parameters
CosmosDB->>Azure: SQL query + @Param1=1737062400000, @Param2="01234"
Azure-->>CosmosDB: Results (correct type matching for numeric fields)
end
CosmosDB-->>Workflow: Query results
alt Simplify enabled (default)
Workflow->>Workflow: Strip internal _metadata fields
end
Workflow-->>UI: Return simplified items
Note over UI,Azure: Key Type Considerations
Note over Workflow: Number.MAX_SAFE_INTEGER limitation<br/>(>9007199254740991 loses precision)
Note over Azure: Type-sensitive comparisons<br/>(string vs number mismatch → empty results)
4 tasks
|
|
|
Thanks @strzeluk! We'll hold off on reviewing this until the PR is ready to go in the main repo. |
Author
|
PR is merged, we can move forward with updating the docs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Added a new Item: Execute Query section to the Azure Cosmos DB node documentation.
The section covers:
Number.MAX_SAFE_INTEGERprecision limitationThis documentation accompanies n8n-io/n8n#25882, which fixes a bug where the Query Parameters option was silently converting numeric values to strings, causing empty results when filtering on numeric fields in Cosmos DB. The new Query Parameters (JSON) option was added as part of that fix to give users explicit type control.
Checklist
Summary by cubic
Adds an “Item: Execute Query” section to the Azure Cosmos DB node docs with parameters and options, including the new “Query Parameters (JSON)” input. Explains type-safe parameter handling, when to use each option, and the Number.MAX_SAFE_INTEGER precision limit to avoid empty results on numeric filters.
Written for commit 18cc8d9. Summary will update on new commits.