feldera_types/format/
raw.rs

1use std::fmt::Debug;
2
3use serde::{Deserialize, Serialize};
4use utoipa::ToSchema;
5
6#[derive(Clone, Debug, Default, Deserialize, Serialize, ToSchema)]
7pub enum RawParserMode {
8    #[default]
9    #[serde(rename = "blob")]
10    Blob,
11
12    #[serde(rename = "lines")]
13    Lines,
14}
15
16#[derive(Clone, Debug, Default, Deserialize, Serialize, ToSchema)]
17#[serde(default)]
18pub struct RawParserConfig {
19    /// Ingestion mode.
20    ///
21    /// * `blob` (default) - ingest the entire data chunk received from the transport connector as a single SQL row.
22    ///   For message-oriented transports, such as Kafka or Pub/Sub, an input chunk corresponds to a message.
23    ///   For file-based transports, e.g., the URL connector or the S3 connector, a chunk represents an entire file or object.
24    /// * `lines` - split the input byte stream on the new line character (`\n`) and ingest each line as a separate SQL row.
25    pub mode: RawParserMode,
26
27    /// Table column that will store the raw value.
28    ///
29    /// This setting is required if the table has more than 1 column.
30    pub column_name: Option<String>,
31}