Can you help me?
I’m trying to test the new CURL function using Couchbase 4.6 Docker container and I’m getting the following error:
"msg": "syntax error - at (",
"query_from_user": "SELECT count(row) FROM CURL(\"GET\",\"https://api.punkapi.com/v2/beers/1\");"
@isha can help you with this.
SELECT count(*) FROM CURL("GET","https://api.punkapi.com/v2/beers/1") a
there is an
a at the end as alias.
This feature is released in 5.0.0 Developer Preview. Since you are on 4.6 you get an error.
If you go to the developer tab here and download the 5.0 DP, you should be able to run the CURL command.
I did resolved to try based on this article: https://blog.couchbase.com/developer-release-curl-n1ql/
But, on the other hand, I didn’t pay attention to the title of the article.
You can also refer to all the N1QL Dzone articles for a more detailed view on our different features/performance etc.
For CURL we have a Dzone article that was published https://dzone.com/articles/curl-comes-to-n1ql-querying-external-json-data.
This should give you examples on how to use the different options/ rest api parameters with the N1QL CURL function.