Query
type: "io.kestra.plugin.weaviate.Query"
Query Weaviate database with GraphQL.
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
fetchType
- Type: string
- Dynamic: ❌
- Required: ✔️
- Default:
STORE
- Possible Values:
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.
url
- Type: string
- Dynamic: ✔️
- Required: ✔️
- Min length:
1
Connection URL
Example: localhost:8080 or https://cluster-id.weaviate.network
apiKey
- Type: string
- Dynamic: ✔️
- Required: ❌
API key to authenticate with a managed Weaviate cluster
If not provided, the anonymous authentication scheme will be used.
headers
- Type: object
- SubType: string
- Dynamic: ✔️
- Required: ❌
- Default:
{}
Additional headers to add to the request e.g. to authenticate with OpenAI API
query
- Type: string
- Dynamic: ✔️
- Required: ❌
GraphQL query
Outputs
row
- Type: object
- Required: ❌
Map containing the first row of fetched data.
Only populated if using
fetchType=FETCH_ONE
.
rows
- Type: array
- SubType:
- Required: ❌
List containing the fetched data.
Only populated if using
fetchType=FETCH
.
size
- Type: integer
- Required: ❌
The number of fetched rows.
uri
- Type: string
- Required: ❌
- Format:
uri
Kestra's internal storage URI of the stored data.
Only populated if using
fetchType=STORE
.
Definitions
Was this page helpful?