risingwavelabs/risingwave · error · SinkError
File error
Error message
File error: {0} What it means
A SinkError variant carrying a plain String for filesystem sink failures. Raised when writing sink output to local or remote (S3, etc.) files fails — path errors, permission errors, or object-store errors during file creation/writing/commit.
Solutions
- Verify the file path/URL format (e.g. s3://bucket/prefix or /local/dir) and that the parent directory/bucket exists.
- Check credentials/permissions for the target storage (S3 IAM, local FS permissions).
- Validate file_format and path options against supported values.
- Rerun after fixing; if transient object-store errors, retry the sink.
Example fix
// before WITH (connector='file', file_path='s3://mybucket') // missing prefix path // after WITH (connector='file', file_path='s3://mybucket/output/', file_format='parquet')
Defensive patterns
Strategy: validation
Validate before calling
aws s3 ls s3://mybucket/output/ || mkdir -p /local/dir # ensure destination exists and is writable
Try / catch
if let SinkError::File(msg) = err { log::error!("file sink: {msg}"); /* fix path/permissions before restarting sink */ } Prevention
- Validate the path/URL format and existence before CREATE SINK
- Grant the storage principal PutObject/FS write permissions
- Use a trailing prefix path, not a bare bucket or an existing file path
When it happens
Trigger: Creating or writing files to the configured file path/URL fails: invalid path format, bucket missing, permissions denied, or unsupported file format/compression option.
Common situations: Wrong s3:// prefix or missing trailing path, IAM role lacking PutObject, nonexistent local directory, misspelled file_format option, path is a directory instead of a prefix.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- config deserialization error
- {e}
- ` ` must be , or
- ` ` must be , or
- S3 configuration is required for redshift s3 sink
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/f7e8728c5961cc67.
Report an issue: GitHub.
Appendix: source
Thrown at src/connector/src/sink/mod.rs:1182
#[source]
#[backtrace]
anyhow::Error,
),
#[error("LanceDB error: {0}")]
LanceDb(
#[source]
#[backtrace]
anyhow::Error,
),
#[error("ElasticSearch/OpenSearch error: {0}")]
ElasticSearchOpenSearch(
#[source]
#[backtrace]
anyhow::Error,
),
#[error("Starrocks error: {0}")]
Starrocks(String),
#[error("File error: {0}")]
File(String),
#[error("Pulsar error: {0}")]
Pulsar(
#[source]
#[backtrace]
anyhow::Error,
),
#[error(transparent)]
Internal(
#[from]
#[backtrace]
anyhow::Error,
),
#[error("BigQuery error: {0}")]
BigQuery(
#[source]
#[backtrace]
anyhow::Error,View on GitHub (pinned to 6469eb736d)