Query Query

yaml
type: "io.kestra.plugin.gcp.firestore.Query"

Query documents of a collection.

Examples

yaml
id: gcp_firestore_query
namespace: company.team

tasks:
  - id: query
    type: io.kestra.plugin.gcp.firestore.Query
    collection: "persons"
    filters:
      - field: "lastname"
        value: "Doe"

Properties

collection

  • Type: string
  • Dynamic: ✔️
  • Required:

The Firestore collection

fetchType

  • Type: string
  • Dynamic:
  • Required:
  • Default: STORE
  • Possible Values:
    • STORE
    • FETCH
    • FETCH_ONE
    • NONE

The way you want to store the data

FETCH_ONE output the first row, FETCH output all the rows, STORE store all rows in a file, NONE do nothing.

filters

List of query filters that will be added as a where clause.

limit

  • Type: integer
  • Dynamic:
  • Required:

Maximum numbers of returned results.

offset

  • Type: integer
  • Dynamic:
  • Required:

Start offset for pagination of the query results.

orderBy

  • Type: string
  • Dynamic:
  • Required:

Field name for the order by clause.

orderDirection

  • Type: string
  • Dynamic:
  • Required:
  • Default: ASCENDING
  • Possible Values:
    • ASCENDING
    • DESCENDING

Field name for the order by clause.

projectId

  • Type: string
  • Dynamic: ✔️
  • Required:

The GCP project ID.

scopes

  • Type: array
  • SubType: string
  • Dynamic: ✔️
  • Required:
  • Default: [https://www.googleapis.com/auth/cloud-platform]

The GCP scopes to be used.

serviceAccount

  • Type: string
  • Dynamic: ✔️
  • Required:

The GCP service account key.

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

io.kestra.plugin.gcp.firestore.Query-Filter

Properties

field
  • Type: string
  • Dynamic:
  • Required: ✔️

Field name for the filter.

value
  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Field value for the filter.

Field value for the filter. Only strings are supported at the moment.

operator
  • Type: string
  • Dynamic:
  • Required:
  • Default: EQUAL_TO
  • Possible Values:
    • EQUAL_TO
    • NOT_EQUAL_TO
    • LESS_THAN
    • LESS_THAN_OR_EQUAL_TO
    • GREATER_THAN
    • GREATER_THAN_OR_EQUAL_TO

The operator for the filter, by default EQUAL_TO that will call 'collection.whereEqualTo(name, value)'

Was this page helpful?