question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DocumentDB input binding - support advanced queries for retrieval

See original GitHub issue

Currently we can only fetch one document, through its ID, at each invocation. It would be great if we could specify a query that would run based on HTTP trigger parameters. Something like this:

SELECT *
FROM volcanoes v
WHERE ST_DISTANCE(v.Location, { 
    "type": "Point", 
    "coordinates": [QPARAM1, QPARAM2] 
    }) < 100 * 1000
AND v.Type = QPARAM3
AND v["Last Known Eruption"] = "Last known eruption from 1800-1899, inclusive"

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mathewccommented, Dec 5, 2016

This came up in SO recently here: http://stackoverflow.com/questions/40968323/can-i-get-all-the-documents-from-documentdb-in-azure-funtions-without-specifying. We should really expand this binding soon to support pulling in multiple documents.

0reactions
brettsamcommented, Mar 8, 2017

Documentation on SqlQuery (which maps to sqlQuery in Functions) can be found here: https://github.com/Azure/azure-webjobs-sdk-extensions/blob/dev/README.md#documentdb

Read more comments on GitHub >

github_iconTop Results From Across the Web

Querying - Amazon DocumentDB
To retrieve all documents that match a field and value, use the find() operation with a query document that identifies the fields and...
Read more >
Best Practices for Amazon DocumentDB
The following are basic operational guidelines that everyone should follow when working with Amazon DocumentDB. The Amazon DocumentDB Service Level ...
Read more >
DocumentDB - Quick Guide
DocumentDB enables complex ad-hoc queries using SQL language, and every document is instantly queryable the moment it's created. You can search on any...
Read more >
SQL query in DocumentDB
Microsoft Azure DocumentDB supports querying documents using SQL (Structured Query Language) as a JSON query language. DocumentDB is truly schema-free.
Read more >
Introduction to DocumentDB, a JSON database | Microsoft Docs
As a schema-free NoSQL database,. DocumentDB provides rich and familiar SQL query capabilities with consistent low latencies on JSON data -.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found