azure-webjobs-sdk-extensions: Query parameter not resolved in SqlQuery statement
Users want to get a query parameter to resolve in a CosmosDB input binding expression:
"SELECT * FROM c.users WHERE c.CustomerId like {Query.customerId}
But it doesn’t work per this: https://github.com/Azure/azure-functions-host/issues/2554#issuecomment-392084583
Would be good to support for consistency with other bindings
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 6
- Comments: 15 (2 by maintainers)
@jeffhollan It’s been a while since first raised via https://github.com/Azure/azure-functions-host/issues/2554 but customers running into it from time to time still… Workarounds:
None are as nice as Query Params if Query Params is your project’s default though
Neither
SqlQuery = "SELECT * FROM c WHERE c.User = {Query.user}"norSqlQuery = "SELECT * FROM c WHERE c.User = {user}"worked with an url ofhttp://yourapi/a?user=myid. I’m using the latest SDK, Microsoft.Azure.WebJobs.Extensions.CosmosDB 3.0.10. Route path is still the way to go.