sinks
Creates, updates, deletes, gets or lists a sinks resource.
Overview
| Name | sinks |
| Type | Resource |
| Id | cloudflare.pipelines.sinks |
Fields
The following fields are returned by SELECT queries:
- get
- list
Indicates that Sink was retrieved.
| Name | Datatype | Description |
|---|---|---|
id | string | Indicates a unique identifier for this sink. |
name | string | Defines the name of the Sink. |
config | object | Defines the configuration of the R2 Sink. (title: R2 Sink Public) |
created_at | string (date-time) | |
format | object | (title: Json) |
modified_at | string (date-time) | |
schema | object | |
type | string | Specifies the type of sink. (r2, r2_data_catalog) |
Indicates successfully listed Sinks.
| Name | Datatype | Description |
|---|---|---|
id | string | Indicates a unique identifier for this sink. |
name | string | Defines the name of the Sink. |
config | object | Defines the configuration of the R2 Sink. (title: R2 Sink Public) |
created_at | string (date-time) | |
format | object | (title: Json) |
modified_at | string (date-time) | |
schema | object | |
type | string | Specifies the type of sink. (r2, r2_data_catalog) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | account_id, sink_id | Get Sink Details. | |
list | select | account_id | pipeline_id, page, per_page | List/Filter Sinks in Account. |
create | insert | account_id, name, type | Create a new Sink. | |
delete | delete | account_id, sink_id | force | Delete Pipeline in Account. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
sink_id | string | |
force | string | |
page | number | |
per_page | number | |
pipeline_id | string |
SELECT examples
- get
- list
Get Sink Details.
SELECT
id,
name,
config,
created_at,
format,
modified_at,
schema,
type
FROM cloudflare.pipelines.sinks
WHERE account_id = '{{ account_id }}' -- required
AND sink_id = '{{ sink_id }}' -- required
;
List/Filter Sinks in Account.
SELECT
id,
name,
config,
created_at,
format,
modified_at,
schema,
type
FROM cloudflare.pipelines.sinks
WHERE account_id = '{{ account_id }}' -- required
AND pipeline_id = '{{ pipeline_id }}'
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
;
INSERT examples
- create
- Manifest
Create a new Sink.
INSERT INTO cloudflare.pipelines.sinks (
config,
format,
name,
schema,
type,
account_id
)
SELECT
'{{ config }}',
'{{ format }}',
'{{ name }}' /* required */,
'{{ schema }}',
'{{ type }}' /* required */,
'{{ account_id }}'
RETURNING
result,
success
;
# Description fields are for documentation purposes
- name: sinks
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the sinks resource.
- name: config
description: |
Defines the configuration of the R2 Sink.
value:
account_id: "{{ account_id }}"
bucket: "{{ bucket }}"
credentials:
access_key_id: "{{ access_key_id }}"
secret_access_key: "{{ secret_access_key }}"
file_naming:
prefix: "{{ prefix }}"
strategy: "{{ strategy }}"
suffix: "{{ suffix }}"
jurisdiction: "{{ jurisdiction }}"
partitioning:
time_pattern: "{{ time_pattern }}"
path: "{{ path }}"
rolling_policy:
file_size_bytes: {{ file_size_bytes }}
inactivity_seconds: {{ inactivity_seconds }}
interval_seconds: {{ interval_seconds }}
namespace: "{{ namespace }}"
table_name: "{{ table_name }}"
token: "{{ token }}"
- name: format
value:
decimal_encoding: "{{ decimal_encoding }}"
timestamp_format: "{{ timestamp_format }}"
unstructured: {{ unstructured }}
type: "{{ type }}"
compression: "{{ compression }}"
row_group_bytes: {{ row_group_bytes }}
- name: name
value: "{{ name }}"
description: |
Defines the name of the Sink.
- name: schema
value:
fields:
- metadata_key: "{{ metadata_key }}"
name: "{{ name }}"
sql_name: "{{ sql_name }}"
type: "{{ type }}"
unit: "{{ unit }}"
fields: "{{ fields }}"
items:
metadata_key: "{{ metadata_key }}"
name: "{{ name }}"
sql_name: "{{ sql_name }}"
type: "{{ type }}"
unit: "{{ unit }}"
fields:
- metadata_key: "{{ metadata_key }}"
name: "{{ name }}"
sql_name: "{{ sql_name }}"
type: "{{ type }}"
unit: "{{ unit }}"
fields: "{{ fields }}"
items:
metadata_key: "{{ metadata_key }}"
name: "{{ name }}"
sql_name: "{{ sql_name }}"
type: "{{ type }}"
unit: "{{ unit }}"
fields: "{{ fields }}"
items: "{{ items }}"
items:
metadata_key: "{{ metadata_key }}"
name: "{{ name }}"
sql_name: "{{ sql_name }}"
type: "{{ type }}"
unit: "{{ unit }}"
fields:
- metadata_key: "{{ metadata_key }}"
name: "{{ name }}"
sql_name: "{{ sql_name }}"
type: "{{ type }}"
unit: "{{ unit }}"
fields: "{{ fields }}"
items:
metadata_key: "{{ metadata_key }}"
name: "{{ name }}"
sql_name: "{{ sql_name }}"
type: "{{ type }}"
unit: "{{ unit }}"
fields: "{{ fields }}"
items: "{{ items }}"
items:
metadata_key: "{{ metadata_key }}"
name: "{{ name }}"
sql_name: "{{ sql_name }}"
type: "{{ type }}"
unit: "{{ unit }}"
fields: "{{ fields }}"
items: "{{ items }}"
format:
decimal_encoding: "{{ decimal_encoding }}"
timestamp_format: "{{ timestamp_format }}"
unstructured: {{ unstructured }}
type: "{{ type }}"
compression: "{{ compression }}"
row_group_bytes: {{ row_group_bytes }}
inferred: {{ inferred }}
- name: type
value: "{{ type }}"
description: |
Specifies the type of sink.
valid_values: ['r2', 'r2_data_catalog']
DELETE examples
- delete
Delete Pipeline in Account.
DELETE FROM cloudflare.pipelines.sinks
WHERE account_id = '{{ account_id }}' --required
AND sink_id = '{{ sink_id }}' --required
AND force = '{{ force }}'
;