{"record":{"id":"59cb0cadc83459f7","repo":"nautechsystems/nautilus_trader","slug":"unknown-data-class-data-cls","errorCode":null,"errorMessage":"Unknown data class: {data_cls}","messagePattern":"Unknown data class: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/persistence/src/backend/catalog.rs","lineNumber":3954,"sourceCode":"        // Skip unsupported stream data types without error.\n        if Self::is_excluded_stream_data_type(data_cls) {\n            return Ok(());\n        }\n\n        // Convert data class name to filename (e.g., \"quotes\" -> \"quotes\")\n        // The data_cls should already be in the correct format (snake_case)\n        let data_name = to_snake_case(data_cls);\n\n        // List all feather files for this data class\n        let feather_files =\n            self.list_feather_files(subdirectory, instance_id, &data_name, identifiers)?;\n\n        if feather_files.is_empty() {\n            return Ok(());\n        }\n\n        if !Self::is_supported_stream_data_type(&data_name) {\n            anyhow::bail!(\"Unknown data class: {data_cls}\");\n        }\n\n        // Process each feather file independently so that each file's identifier\n        // (instrument_id or bar_type from schema metadata) is preserved when writing\n        // to parquet. This matches the Python _convert_feather_table_to_parquet approach.\n        for file_path in feather_files {\n            let batches = self.read_feather_file(&file_path)?;\n            self.convert_feather_batches_to_parquet(\n                &data_name,\n                &file_path,\n                batches,\n                use_ts_event_for_ts_init,\n            )?;\n        }\n\n        Ok(())\n    }\n","sourceCodeStart":3936,"sourceCodeEnd":3972,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/persistence/src/backend/catalog.rs#L3936-L3972","documentation":"During feather-to-parquet stream conversion, `convert_stream_to_data` checks the stream's data name against `is_supported_stream_data_type`. If the data class (e.g. a stream type the catalog cannot map to a known parquet writer) is unsupported, conversion bails instead of producing parquet with an unrecognizable schema. Only known stream data classes (quotes, trades, bars, deltas, etc.) can be converted.","triggerScenarios":"Calling `convert_stream_to_data` for a stream directory whose data name is not one of the supported stream data types — e.g. custom/unknown record types written to the feather catalog, or a typo'd data_cls identifier in the stream metadata.","commonSituations":"Migrating legacy feather catalogs that contain stream types added after this converter was written; custom Nautilus stream data not in the supported set; renamed data types between versions leaving old directories with stale names.","solutions":["Check the stream's data name against the supported types enforced by `is_supported_stream_data_type` and only convert supported streams.","Exclude or manually migrate the unsupported stream directories instead of running bulk conversion.","If the type should be supported, extend the conversion logic (or upgrade to a library version that supports the data class)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Only convert streams whose data name is in the supported set\nif !supported_stream_data_types().contains(data_name) {\n    eprintln!(\"skipping unsupported stream: {data_name}\");\n    return Ok(());\n}","typeGuard":null,"tryCatchPattern":"match catalog.convert_stream_to_data(stream_id, data_cls, &files) {\n    Err(e) if e.to_string().starts_with(\"Unknown data class\") => {\n        log::warn!(\"skipping unsupported stream data: {e}\");\n    }\n    Err(e) => return Err(e),\n    Ok(()) => {}\n}","preventionTips":["List stream directories and check each data name against the supported set before running bulk migration.","Keep custom data types out of directories targeted by the automatic converter.","After a library upgrade, re-scan legacy catalogs for data types added/renamed between versions."],"tags":["data-conversion","unsupported-type","rust"],"backgroundTag":"unsupported-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"}