> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://apidocs.polytomic.com/2024-02-08/guides/configuring-your-connections/connections/cloudflare_r2/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server. # Cloudflare R2 Supports: * ✅ Models * ✅ Model sync destination * ✅ Bulk sync source * ✅ Bulk sync destination ## Connection ### Configuration
NameTypeDescriptionRequired
account_id string Account ID required
aws_access_key_id string Access Key ID with read/write access to a bucket. required
aws_secret_access_key string Secret access key required
bucket_name string Bucket name (folder optional); ex: polytomic/dataset required
csv_has_headers boolean CSV files have headers

Whether CSV files have a header row with field names.
optional
is_single_table boolean Files are time-based snapshots

Treat the files as a single table. ↓
optional
#### `is_single_table` = `true`
NameTypeDescriptionRequired
is_directory_snapshot boolean Multi-directory multi-table ↓ optional
```json { "name": "Cloudflare R2 connection", "type": "cloudflare_r2", "configuration": { "account_id": "", "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE", "aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "bucket_name": "polytomic/dataset", "csv_has_headers": true, "is_directory_snapshot": false, "is_single_table": true, "single_table_file_format": "csv", "single_table_name": "collection", "skip_lines": 0 } } ``` ##### `is_directory_snapshot` When `is_directory_snapshot` is `true`:
NameTypeDescriptionRequired
directory_glob_pattern string Tables glob path required
```json { "name": "Cloudflare R2 connection", "type": "cloudflare_r2", "configuration": { "account_id": "", "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE", "aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "bucket_name": "polytomic/dataset", "csv_has_headers": true, "directory_glob_pattern": "", "is_directory_snapshot": true, "is_single_table": true, "single_table_file_formats": [] } } ``` #### `is_single_table` = `true` and `is_directory_snapshot` = `false`
NameTypeDescriptionRequired
single_table_file_format string File format

Accepted values: `csv` ↓, `json`, `parquet`
optional
single_table_name string Collection name optional
##### `single_table_file_format` When `single_table_file_format` is `csv` or `single_table_file_formats` contains `csv`:
NameTypeDescriptionRequired
skip_lines integer Skip first lines

Skip first N lines of each CSV file.
optional
#### `is_single_table` = `true` and `is_directory_snapshot` = `true`
NameTypeDescriptionRequired
single_table_file_formats array File formats that may be present across different tables optional
#### Example ```json { "name": "Cloudflare R2 connection", "type": "cloudflare_r2", "configuration": { "account_id": "", "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE", "aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "bucket_name": "polytomic/dataset", "csv_has_headers": true, "is_single_table": false } } ``` ## Model Sync ### Source #### Configuration
NameTypeDescriptionRequired
file_format string File format

Accepted values: `csv`, `json`, `parquet`
optional
key string Object key

The key of the object in the bucket to read from.
optional
model_from string Files

The model is generated from a single file or a multi-file archive. Accepted values: `single_file`, `multi_file_archive`
required
skip_lines integer Skip first lines

Skip first N lines of each CSV file.
optional
subfolder string Subfolder to read files from from (optional) optional
#### Example ```json { ... "configuration": { "file_format": "csv", "key": "", "model_from": "single_file", "skip_lines": 0, "subfolder": "" } } ``` ### Target Cloudflare R2 connections may be used as the destination in a model sync. #### All targets ##### Configuration
NameTypeDescriptionRequired
format string Output format

Output file encoding. Accepted values: `csv`, `json-doc`, `json`, `parquet`
optional
##### Example ```json { ... "target": { "configuration": { "format": "csv" } } } ``` ## Bulk Sync ### Source Cloudflare R2 connections may be used as a bulk sync source. No additional configuration options are required. ### Destination #### Configuration
NameTypeDescriptionRequired
advanced object optional
format string Output file encoding optional
subfolder string Subfolder to write to (optional) optional
#### Example ```json { ... "destination_configuration": { "advanced": { "write_incremental": false }, "format": "csv", "subfolder": "reports" } } ```