Description
This article discusses how to troubleshoot the below user actionable error with a Fully managed S3 Sink Connector.
Invalid value for configuration path.format: Illegal pattern component
or
Could not parse the value of 'path.format' configuration. Please check the documentation here (
Amazon S3 Sink connector for Confluent Cloud Quick Start | Confluent Documentation ) and adjust its value accordingly.
Applies To
Amazon S3 Sink Connector
Confluent Cloud
Cause
This error typically occurs when there is an issue with the path.format
configuration in your S3 Sink connector. This error indicates that the pattern specified in the path.format
configuration contains an illegal component that cannot be parsed.
Resolution
To resolve this issue, you should check the path.format
configuration value and ensure that it uses valid date and time identifiers. Also, double-check that the value specified is with correct syntax and formatting. You can refer to the documentation for the S3 Sink connector for more details on the correct format to use: [Confluent Cloud S3 Sink Connector Documentation], especially the usage of quotes (''
), around the date and time identifiers.
For example, a valid pattern for a time-based partitioner might look like below, in case of hourly partitioning--> 'year'=YYYY/'month'=MM/'day'=dd/'hour'=HH
Similarly, if we specify it as "'dt'=YYYY-MM-dd/'hr'=HH" "
, the resulting directory structure in S3 would look something similar to below:
s3://<s3-bucket-name>/json_logs/hourly/<Topic-Name>/dt=2025-02-12/hr=09/<files>