{"record":{"id":"05ab5e559541b25b","repo":"influxdata/influxdb","slug":"0-is-not-a-valid-data-type-values-are-int64-uint64-float64","errorCode":null,"errorMessage":"{0} is not a valid data type, values are int64, uint64, float64, utf8, and bool","messagePattern":"(.+?) is not a valid data type, values are int64, uint64, float64, utf8, and bool","errorType":"validation","errorClass":"ParseDataTypeError","httpStatus":null,"severity":"error","filePath":"influxdb3_commands/src/common.rs","lineNumber":95,"sourceCode":"\n        Ok(Self((\n            key.parse().map_err(Into::into)?,\n            value.parse().map_err(Into::into)?,\n        )))\n    }\n}\n\n#[derive(Debug, Copy, Clone, PartialEq, Eq)]\npub enum DataType {\n    Int64,\n    Uint64,\n    Float64,\n    Utf8,\n    Bool,\n}\n\n#[derive(Debug, PartialEq, Eq, thiserror::Error)]\n#[error(\"{0} is not a valid data type, values are int64, uint64, float64, utf8, and bool\")]\npub struct ParseDataTypeError(String);\n\nimpl FromStr for DataType {\n    type Err = ParseDataTypeError;\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        match s {\n            \"int64\" => Ok(Self::Int64),\n            \"uint64\" => Ok(Self::Uint64),\n            \"float64\" => Ok(Self::Float64),\n            \"utf8\" => Ok(Self::Utf8),\n            \"bool\" => Ok(Self::Bool),\n            _ => Err(ParseDataTypeError(s.into())),\n        }\n    }\n}\n\nimpl Display for DataType {\n    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_commands/src/common.rs#L77-L113","documentation":"ParseDataTypeError is returned when a string cannot be parsed into the DataType enum, which only accepts int64, uint64, float64, utf8, and bool. It carries the offending input so the message names exactly what was rejected and lists the valid values.","triggerScenarios":"Passing a --type / data-type CLI argument (e.g. when creating a table field or defining a schema) whose value is not one of the five exact strings: int64, uint64, float64, utf8, bool.","commonSituations":"Using InfluxQL/SQL-style or InfluxDB 1.x type names (integer, float, string, boolean, timestamp) instead of the arrow-style names; capitalization like INT64 or Float; abbreviations (int, str, bool vs utf8 confusion); forgetting to specify uint64 when data is unsigned.","solutions":["Use one of the exact accepted values: int64, uint64, float64, utf8, bool (lowercase).","Replace legacy InfluxDB type names: integer→int64, float→float64, string→utf8, boolean→bool.","Check for typos and stray whitespace in the argument (quote it if needed).","Use uint64 only for unsigned data; use int64 for signed integers."],"exampleFix":"// before\ninfluxdb3 create table ... --field temperature:float\n// after\ninfluxdb3 create table ... --field temperature:float64","handlingStrategy":"validation","validationCode":"const VALID: [&str; 5] = [\"int64\", \"uint64\", \"float64\", \"utf8\", \"bool\"];\nfn validate_data_type(s: &str) -> Result<(), String> {\n    if !VALID.contains(&s) {\n        return Err(format!(\"'{s}' invalid; use int64, uint64, float64, utf8, bool\"));\n    }\n    Ok(())\n}","typeGuard":"fn is_valid_data_type(s: &str) -> bool {\n    matches!(s, \"int64\" | \"uint64\" | \"float64\" | \"utf8\" | \"bool\")\n}","tryCatchPattern":null,"preventionTips":["Map legacy InfluxDB type names to the arrow-style names before use (float→float64, string→utf8, etc.).","Keep a lookup table of accepted type strings in scripts.","Enforce lowercase input; the parser is exact-match.","Use 'bool' not 'boolean' and 'utf8' not 'string'."],"tags":["cli","parsing","data-types","rust"],"backgroundTag":"invalid-enum-value","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}