Query
Query Weaviate database with GraphQL.
type: "io.kestra.plugin.weaviate.Query"
Examples
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
}
}
}
Properties
query *Requiredstring
1
GraphQL query
url *Requiredstring
1
Connection URL
Example: localhost: 8080 or https://cluster-id.weaviate.network
apiKey string
API key to authenticate with a managed Weaviate cluster
If not provided, the anonymous authentication scheme will be used.
fetchType string
STORE
STORE
FETCH
FETCH_ONE
NONE
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.
headers object
Additional headers to add to the request e.g. to authenticate with OpenAI API
Outputs
row object
Map containing the first row of fetched data.
Only populated if using fetchType=FETCH_ONE
.
rows array
List containing the fetched data.
Only populated if using fetchType=FETCH
.
size integer
The number of fetched rows.
uri string
uri
Kestra's internal storage URI of the stored data.
Only populated if using fetchType=STORE
.