Query
Query Weaviate database with GraphQL.
type: "io.kestra.plugin.weaviate.Query"
Execute a GraphQL query to fetch data from a Weaviate database.
id: weaviate_query
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.weaviate.Query
url: https://demo-cluster-id.weaviate.network
apiKey: "{{ secret('WEAVIATE_API_KEY') }}"
query: |
{
Get {
Question(limit: 5) {
question
answer
category
}
}
}
Query data from a Weaviate database using Generative Search with OpenAI
id: weaviate_generative_search
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.weaviate.Query
url: https://demo-cluster-id.weaviate.network
apiKey: "{{ secret('WEAVIATE_API_KEY') }}"
headers:
X-OpenAI-Api-Key: "{{ secret('OPENAI_API_KEY') }}"
query: |
{
Get {
Question(limit: 5, nearText: {concepts: ["biology"]}) {
question
answer
category
}
}
}
How you want to store the output data
FETCH_ONE outputs only the first row
FETCH outputs all rows
STORE stores all rows in a file
NONE doesn't store any data. It's particularly useful when you execute DDL statements or run queries that insert data into another table e.g. using SELECT ... INSERT INTO
statements.
GraphQL query
Connection URL
Example: localhost: 8080 or https://cluster-id.weaviate.network
API key to authenticate with a managed Weaviate cluster
If not provided, the anonymous authentication scheme will be used.
Additional headers to add to the request e.g. to authenticate with OpenAI API
Map containing the first row of fetched data.
Only populated if using fetchType=FETCH_ONE
.
List containing the fetched data.
Only populated if using fetchType=FETCH
.
The number of fetched rows.
Kestra's internal storage URI of the stored data.
Only populated if using fetchType=STORE
.