pub enum DataSource {
File {
path: String,
format: FileFormat,
size_bytes: u64,
modified_at: Option<String>,
parquet_metadata: Option<ParquetMetadata>,
},
Query {
engine: QueryEngine,
statement: String,
database: Option<String>,
execution_id: Option<String>,
},
DataFrame {
name: String,
source_library: DataFrameLibrary,
row_count: usize,
column_count: usize,
memory_bytes: Option<u64>,
},
Stream {
topic: String,
batch_id: String,
partition: Option<u32>,
consumer_group: Option<String>,
source_system: StreamSourceSystem,
session_id: Option<String>,
first_record_at: Option<String>,
last_record_at: Option<String>,
},
}Expand description
Source-agnostic data source metadata.
Variants§
File
File-based data source (CSV, JSON, Parquet, etc.)
Fields
§
format: FileFormatDetected or specified file format
§
parquet_metadata: Option<ParquetMetadata>Parquet-specific metadata (only present for Parquet files)
Query
SQL query-based data source
Fields
§
engine: QueryEngineDatabase engine used for the query
DataFrame
In-memory DataFrame source (pandas/polars via PyCapsule)
Fields
§
source_library: DataFrameLibrarySource library (pandas, polars, pyarrow)
Stream
Streaming data source
Fields
§
source_system: StreamSourceSystemSource system identifier (kafka, kinesis, pulsar, http, etc.)
Implementations§
Source§impl DataSource
impl DataSource
Sourcepub fn identifier(&self) -> String
pub fn identifier(&self) -> String
Get a human-readable identifier for this data source.
Sourcepub fn size_mb(&self) -> Option<f64>
pub fn size_mb(&self) -> Option<f64>
Get file size in megabytes if this is a file-based source or dataframe.
Sourcepub fn is_dataframe(&self) -> bool
pub fn is_dataframe(&self) -> bool
Check if this is a DataFrame-based source.
Sourcepub fn stream_topic(&self) -> Option<&str>
pub fn stream_topic(&self) -> Option<&str>
Get the stream topic if this is a stream-based source.
Trait Implementations§
Source§impl Clone for DataSource
impl Clone for DataSource
Source§fn clone(&self) -> DataSource
fn clone(&self) -> DataSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataSource
impl Debug for DataSource
Source§impl<'de> Deserialize<'de> for DataSource
impl<'de> Deserialize<'de> for DataSource
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DataSource
impl RefUnwindSafe for DataSource
impl Send for DataSource
impl Sync for DataSource
impl Unpin for DataSource
impl UnsafeUnpin for DataSource
impl UnwindSafe for DataSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more