Repository navigation
Conversation
Replace useView=true + DesignDocument/View setup with the SQL++ (N1QL) consumer mode, which is the default (useView=false). The test now creates a primary index on the bucket so the auto-generated SQL++ query works.
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.
Summary
Closes/fixes https://issues.apache.org/jira/browse/CAMEL-23626
The couchbase-log example was using the deprecated MapReduce View API for consuming documents from Couchbase, which does not work with the Magma storage backend (default since Couchbase 8.0).
Changes
MyRouteBuilder.java: RemoveuseView=truefrom the consumer URI. The SQL++ consumer mode is the default (useView=false), so no other option is needed.CouchbaseTest.java:DesignDocument/Viewconstruction andviewIndexes().upsertDesignDocument()callStorageBackend.COUCHSTOREconstraint (Views required the Couchstore backend; SQL++ works with both Couchstore and Magma)waitUntilReady()before creating the primary index (best practice)queryIndexes().createPrimaryIndex()so the auto-generated SQL++ query worksSystem.out.printlndebug lineThe auto-generated SQL++ query (from
bucket,limit, etc.) requires a primary index to be present. This matches how the existingConsumeSqlQueryITin camel-couchbase sets up its test bucket.Background
PR #189 (merged May 2026) made the test pass by adding
useView=trueand the deprecated View setup as a workaround. This PR reverts that direction and properly migrates to SQL++, as intended by CAMEL-23626.Hermes Agent (Claude claude-sonnet-4-6) on behalf of Guillaume Nodet