pub struct SftpSourceConfig {
pub connection: SftpConnectionConfig,
pub path: String,
pub glob: Option<String>,
pub format: SftpFormat,
pub batch_size: usize,
}Expand description
Configuration for the SFTP source connector.
Fields§
§connection: SftpConnectionConfigShared SFTP connection settings (host, port, username, auth, host-key policy). Flattened, so its fields sit at the top level of the config.
path: StringRemote path to read: a directory whose files are listed and streamed, or a single file.
glob: Option<String>Optional filename glob (* / ?) applied to the basenames of files in
a directory listing. Ignored when path points at a single file.
format: SftpFormatFormat of the files to read (default: jsonl).
batch_size: usizeRecords per emitted StreamPage. For
jsonl / raw_text, files are decoded incrementally and a page is
yielded whenever the buffer reaches this size (bounded memory). For
json_array, each file is buffered fully, then its records are chunked
into pages of this size. Defaults to DEFAULT_BATCH_SIZE.
batch_size = 0 is the “no batching” sentinel: one page is emitted per
file.
Implementations§
Source§impl SftpSourceConfig
impl SftpSourceConfig
Sourcepub fn new(connection: SftpConnectionConfig, path: impl Into<String>) -> Self
pub fn new(connection: SftpConnectionConfig, path: impl Into<String>) -> Self
Build a source config from a connection and a remote path, with default
format (jsonl) and batch size.
Sourcepub fn format(self, format: SftpFormat) -> Self
pub fn format(self, format: SftpFormat) -> Self
Set the file format.
Sourcepub fn with_batch_size(self, batch_size: usize) -> Self
pub fn with_batch_size(self, batch_size: usize) -> Self
Set the per-page record count.
Trait Implementations§
Source§impl Clone for SftpSourceConfig
impl Clone for SftpSourceConfig
Source§fn clone(&self) -> SftpSourceConfig
fn clone(&self) -> SftpSourceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SftpSourceConfig
impl Debug for SftpSourceConfig
Source§impl<'de> Deserialize<'de> for SftpSourceConfig
impl<'de> Deserialize<'de> for SftpSourceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SftpSourceConfig
impl JsonSchema for SftpSourceConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more