pub struct DatasetDescriptor {
pub name: String,
pub kind: String,
pub schema: Option<Value>,
pub estimated_rows: Option<u64>,
pub config_patch: Value,
}Expand description
One dataset discovered behind a source’s connection.
Fields§
§name: StringHuman-readable dataset identity — a qualified table name
(public.orders), a collection, an index, or an object-key prefix.
kind: StringWhat kind of dataset this is: table, collection, index,
prefix, or object. Informational (rendered in output); the
selection mechanics live entirely in config_patch.
schema: Option<Value>The dataset’s column shape as an
infer_schema-shaped object
({"type":"object","properties":{…}}), or None when the source
cannot cheaply introspect it (object stores, schemaless collections
with no sample).
estimated_rows: Option<u64>Approximate row/object count when the catalog exposes one cheaply
(e.g. pg_class.reltuples). Never computed via a full scan.
config_patch: ValuePartial source-config override selecting exactly this dataset —
deep-merged over the connection config by a matrix row (e.g.
{"query": "SELECT * FROM \"public\".\"orders\""} for a SQL source,
{"collection": "orders"} for MongoDB, {"prefix": "raw/orders/"}
for an object store). Must never contain credentials.
Implementations§
Source§impl DatasetDescriptor
impl DatasetDescriptor
Sourcepub fn new(
name: impl Into<String>,
kind: impl Into<String>,
config_patch: Value,
) -> Self
pub fn new( name: impl Into<String>, kind: impl Into<String>, config_patch: Value, ) -> Self
Construct a descriptor with no schema / row estimate.
Sourcepub fn with_schema(self, schema: Value) -> Self
pub fn with_schema(self, schema: Value) -> Self
Attach an inferred/introspected schema.
Sourcepub fn with_estimated_rows(self, rows: u64) -> Self
pub fn with_estimated_rows(self, rows: u64) -> Self
Attach a catalog-provided row estimate.
Trait Implementations§
Source§impl Clone for DatasetDescriptor
impl Clone for DatasetDescriptor
Source§fn clone(&self) -> DatasetDescriptor
fn clone(&self) -> DatasetDescriptor
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 DatasetDescriptor
impl Debug for DatasetDescriptor
Source§impl<'de> Deserialize<'de> for DatasetDescriptor
impl<'de> Deserialize<'de> for DatasetDescriptor
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 PartialEq for DatasetDescriptor
impl PartialEq for DatasetDescriptor
Source§impl Serialize for DatasetDescriptor
impl Serialize for DatasetDescriptor
impl StructuralPartialEq for DatasetDescriptor
Auto Trait Implementations§
impl Freeze for DatasetDescriptor
impl RefUnwindSafe for DatasetDescriptor
impl Send for DatasetDescriptor
impl Sync for DatasetDescriptor
impl Unpin for DatasetDescriptor
impl UnsafeUnpin for DatasetDescriptor
impl UnwindSafe for DatasetDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request