Function common_helpers::avro::get_schema_data_writer
source · pub fn get_schema_data_writer(schema: &Schema) -> Writer<'_, Vec<u8>>
Expand description
Function to get the schema writer with default container as Vec<u8>
Examples
use common_helpers::avro;
use common_helpers::types::*;
let raw_schema = r#"{"type": "record", "name": "User", "fields": [{"name": "name", "type": "string"}, {"name": "favorite_number", "type": "int"}]}"#;
let schema_result = avro::fingerprint_raw_schema(raw_schema);
assert!(schema_result.is_ok());
let avro_schema = schema_result.unwrap().0;
let schema_writer = avro::get_schema_data_writer(&avro_schema);