influxdata/influxdb · error · ValidationError
unsupported specifier found in time format
Error message
unsupported specifier found in time format "{0}" - supported specifiers: {1} What it means
Thrown by `UnsupportedStrfTimeSpecifier` when the TimeFormat part of a partition template contains strftime specifiers the partitioning engine does not support. Only a limited set of specifiers (such as %Y, %m, %d, %H, %M) can be used, because each supported specifier must map to a physical partition key column.
Solutions
- Replace unsupported specifiers with supported ones only (%Y, %m, %d, %H and similar date/time components listed in the module docs).
- Move decorative text out of the format string or into the tag-based parts of the template.
- Before constructing the template, check the format against the supported-specifier list and reject invalid ones client-side.
Example fix
// before
Part::TimeFormat("%Y week %U".into())
// after
Part::TimeFormat("%Y-%m".into()) Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED: &[&str] = &["%Y", "%m", "%d", "%H", "%M"];
fn specifiers(fmt: &str) -> Vec<&str> {
fmt.match_indices('%').filter_map(|(i, _)| fmt.get(i..i+2)).collect()
}
fn only_supported(fmt: &str) -> bool {
specifiers(fmt).iter().all(|s| SUPPORTED.contains(s))
} Try / catch
match PartitionTemplate::new(parts) {
Err(e) if e.to_string().contains("unsupported specifier") => {
eprintln!("use only supported strftime specifiers, e.g. %Y-%m-%d %H");
Err(e.into())
}
other => other.map_err(Into::into),
} Prevention
- Restrict format strings to the documented supported specifier set.
- Do not embed literal text, timezones, or week/year-day specifiers in the format.
- Test format strings against the validator before shipping them in config.
When it happens
Trigger: Creating a template with `Part::TimeFormat("%Y week %U")` or other exotic specifiers (%j, %U, %Z, timezones, etc.) via `PartitionTemplate::new` or the create-database API.
Common situations: Copying a strftime format from another system (cron, Python logging) that supports more specifiers; trying to embed literal % signs incorrectly; attempting timezone-aware formats.
Related errors
- missing required specifier(s) in time format of partition…
- Error converting partition_template
- Expected parts in key due to template passed in, found …
- invalid strftime format in partition template
- invalid year-month format
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/e0d68693da2d8815.
Report an issue: GitHub.
Appendix: source
Thrown at core/data_types/src/partition_template.rs:262
/// This is not allowed
///
/// [`TagValue`]: [`proto::template_part::Part::TagValue`]
/// [`Bucket`]: [`proto::template_part::Part::Bucket`]
#[error("tag name value cannot be repeated in partition template: {0}")]
RepeatedTagValue(String),
/// An attempt to make a new partition template without a [`TimeFormat`]
/// part has been made. This is not allowed.
///
/// [`TimeFormat`]: [`proto::template_part::Part::TimeFormat`]
#[error("partition template must include a time format part")]
TimeFormatPartRequired,
/// The partition template defines a [`TimeFormat`] part, but the
/// provided strftime formatter contains unsupported specifiers.
///
/// [`TimeFormat`]: [`proto::template_part::Part::TimeFormat`]
#[error("unsupported specifier found in time format \"{0}\" - supported specifiers: {1}")]
UnsupportedStrfTimeSpecifier(String, String),
/// The partition template defines a [`TimeFormat`] part, but the
/// provided strftime format that is missing required specifiers.
///
/// For example: using %m without %Y.
///
/// [`TimeFormat`]: [`proto::template_part::Part::TimeFormat`]
#[error("missing required specifier(s) in time format of partition template: {0}")]
MissingRequiredStrfTimeSpecifier(String),
}
/// The maximum number of template parts a custom partition template may specify, to limit the
/// amount of space in the catalog used by the custom partition template and the partition keys
/// created with it.
pub const MAXIMUM_NUMBER_OF_TEMPLATE_PARTS: usize = 8;
/// The sentinel character used to delimit partition key parts in the partitionView on GitHub (pinned to 06200ef96b)