Fauna
Fauna is a Document Database.
QueryFauna
documents
%pip install--upgrade--quiet fauna
Query data example
from langchain_community.document_loaders.faunaimport FaunaLoader
secret="<enter-valid-fauna-secret>"
query="Item.all()"# Fauna query. Assumes that the collection is called "Item"
field="text"# The field that contains the page content. Assumes that the field is called "text"
loader= FaunaLoader(query, field, secret)
docs= loader.lazy_load()
for valuein docs:
print(value)
API Reference:FaunaLoader
Query with Pagination
You get aafter
value if there are more data. You can get values after the curcor by passing in theafter
string in query.
To learn more followingthis link
query="""
Item.paginate("hs+DzoPOg ... aY1hOohozrV7A")
Item.all()
"""
loader= FaunaLoader(query, field, secret)
Related
- Document loaderconceptual guide
- Document loaderhow-to guides