Query

Query

Certified

Run a SQL statement against a Cloudflare D1 database

yaml
type: io.kestra.plugin.cloudflare.d1.Query
yaml
id: d1_query_store
namespace: company.team

tasks:
  - id: query
    type: io.kestra.plugin.cloudflare.d1.Query
    apiToken: "{{ secret('CLOUDFLARE_API_TOKEN') }}"
    accountId: "your_account_id"
    databaseId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    sql: "SELECT id, name FROM users WHERE active = ?"
    params:
      - true
    fetchType: STORE

yaml
id: d1_query_insert
namespace: company.team

tasks:
  - id: insert
    type: io.kestra.plugin.cloudflare.d1.Query
    apiToken: "{{ secret('CLOUDFLARE_API_TOKEN') }}"
    accountId: "your_account_id"
    databaseId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    sql: "INSERT INTO events (name, ts) VALUES (?, ?)"
    params:
      - "deploy"
      - "2024-01-01T00:00:00Z"
    fetchType: NONE
Properties
Defaulthttps://api.cloudflare.com/client/v4
DefaultSTORE
Possible Values
FETCH_ONEFETCHSTORENONE
Definitions
allowFailedbooleanstring
Defaultfalse
allowedResponseCodesarray
SubTypeinteger
auth
type*Requiredobject
passwordstring
usernamestring
type*Requiredobject
tokenstring
type*Requiredobject
passwordstring
usernamestring
basicAuthPasswordDeprecatedstring
basicAuthUserDeprecatedstring
connectTimeoutDeprecatedstring
Formatduration
connectionPoolIdleTimeoutDeprecatedstring
Formatduration
defaultCharsetstring
DefaultUTF-8
followRedirectsbooleanstring
Defaulttrue
logLevelDeprecatedstring
Possible Values
ALLTRACEDEBUGINFOWARNERROROFFNOT_SPECIFIED
logsarray
SubTypestring
Possible Values
REQUEST_HEADERSREQUEST_BODYRESPONSE_HEADERSRESPONSE_BODY
maxContentLengthDeprecatedinteger
proxy
addressstring
passwordstring
portintegerstring
typestring
DefaultDIRECT
Possible Values
DIRECTHTTPSOCKS
usernamestring
proxyAddressDeprecatedstring
proxyPasswordDeprecatedstring
proxyPortDeprecatedinteger
proxyTypeDeprecatedstring
Possible Values
DIRECTHTTPSOCKS
proxyUsernameDeprecatedstring
readIdleTimeoutDeprecatedstring
Formatduration
readTimeoutDeprecatedstring
Formatduration
ssl
insecureTrustAllCertificatesbooleanstring
timeout
connectTimeoutstring
readIdleTimeoutstring
DefaultPT5M
Definitions
changedboolean
changesinteger
durationnumber
last_row_idinteger
rows_readinteger
rows_writteninteger
SubTypeobject
Default0
Formaturi