{"record":{"id":"907b56f73568602c","repo":"nautechsystems/nautilus_trader","slug":"unknown-data-type-for-consolidation-type-name","errorCode":null,"errorMessage":"Unknown data type for consolidation: {type_name}","messagePattern":"Unknown data type for consolidation: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/persistence/src/backend/catalog_operations.rs","lineNumber":751,"sourceCode":"                    identifier,\n                    period_nanos,\n                    start,\n                    end,\n                    ensure_contiguous_files,\n                )?;\n            }\n            _ => {\n                if let Some(custom_type_name) = type_name.strip_prefix(\"custom/\") {\n                    self.consolidate_custom_data_by_period(\n                        custom_type_name,\n                        identifier,\n                        period_nanos,\n                        start,\n                        end,\n                        ensure_contiguous_files,\n                    )?;\n                } else {\n                    anyhow::bail!(\"Unknown data type for consolidation: {type_name}\");\n                }\n            }\n        }\n\n        Ok(())\n    }\n\n    /// Generic consolidate data files by splitting them into fixed time periods.\n    ///\n    /// This is a type-safe version of `consolidate_data_by_period` that uses generic types\n    /// to ensure compile-time correctness and enable reuse across different data types.\n    ///\n    /// # Type Parameters\n    ///\n    /// - `T`: The data type to consolidate, must implement required traits for serialization.\n    ///\n    /// # Parameters\n    ///","sourceCodeStart":733,"sourceCodeEnd":769,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/persistence/src/backend/catalog_operations.rs#L733-L769","documentation":"`consolidate_data_by_period` dispatches on the data type name (e.g. \"quotes\", \"trades\", \"bars\", \"custom/...\") to pick the right generic consolidation routine. If the name matches none of the known built-in types and is not prefixed with `custom/`, the library bails with this error. (Note: the bail string uses `{type_name}` inline-captured by anyhow's format machinery, so the message does include the offending name.)","triggerScenarios":"Calling `consolidate_data_by_period` (via `consolidate_data`/`consolidate_catalog`) with a `data_type` string that is neither one of the known directory names — quotes, trades, deltas, depth10/order_book_depths, bars, index_prices, mark_prices, instrument_closes, etc. — nor of the form `custom/<CustomData>`, e.g. a typo like \"quote\" or \"Bars\".","commonSituations":"Typo or wrong casing in the data_type argument; expecting a custom type to be consolidated without the `custom/` prefix; referring to a type name that differs from the on-disk directory name produced by the writer; version changes where a directory name was renamed.","solutions":["Check the exact directory name under the catalog (e.g. `data/quotes.parquet/`) and pass that string verbatim as data_type.","For custom data types, use the `custom/` prefix: pass `custom/MyCustomType` matching the registered type name.","Fix casing/typos — names are lowercase snake_case exact matches (\"bars\", not \"Bars\").","If the data genuinely needs support, write the files via supported types or extend the dispatch to handle the type."],"exampleFix":"// before\ncatalog.consolidate_data_by_period(\"Bars\", identifier, period_nanos, ...).await?;\n// after\ncatalog.consolidate_data_by_period(\"bars\", identifier, period_nanos, ...).await?;","handlingStrategy":"validation","validationCode":"const KNOWN: &[&str] = &[\"quotes\",\"trades\",\"deltas\",\"depth10\",\"order_book_depths\",\"bars\",\"index_prices\",\"mark_prices\",\"instrument_closes\"];\nif !KNOWN.contains(&data_type) && !data_type.starts_with(\"custom/\") {\n    return Err(format!(\"unsupported data_type: {data_type}\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy data_type strings from the actual catalog directory names on disk.","Remember names are lowercase snake_case; match exactly.","Prefix custom types with `custom/` exactly as registered.","Check the dispatch list in catalog_operations.rs when unsure which names are supported."],"tags":["consolidation","invalid-argument","persistence","data-type"],"backgroundTag":"invalid-enum-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}