Imagine I have a collection of stock data, where there is a "symbol" attribute for each document. In my python function I want to query my collection to return a list of "symbol" attribute values that are unique.
i.e. If I had 3 documents and 2 of the documents had their symbol attribute as "AAPL", and the third document had their symbol attribute as "MSFT", the query would return a list of ["AAPL", "MSFT"]
# Query Database for list of unique symbols
client = (
Client()
.set_endpoint('https://cloud.appwrite.io/v1')
.set_project(PROJECT_ID)
.set_key(APPWRITE_API_KEY)
)
databases = Databases(client)
docs = databases.list_documents(
DATABASE_ID,
COLLECTION_ID,
queries=[
# What queries do I add here?
Query.select(['symbol'])
]
)
Recommended threads
- TablesDB `updateRows` returns `database_...
Hi Appwrite team! I’m seeing a strange issue with TablesDB bulk row updates on a self-hosted Appwrite instance. **Environment** - Appwrite self-hosted `1.9.0` ...
- Functions executed by events does not ap...
Hello, Running self-hosted Appwrite version 1.9.0 (with console 7.8.26). When functions are triggered by an event (eg. databases.\*tables.\*.rows.\*.create) doe...
- Updating GitHub App access throws error
Steps to reproduce - 1. Have some private repos allowed on the install access 2. New Site/Func > Connect GitHub > see the side card saying `Missing a repo` > cl...