pub enum ExportTarget {
DuckDb,
BigQuery,
Snowflake,
}Expand description
A supported downstream warehouse target. Closed, in-tree, contract-tested
set; chosen at runtime from --target X, one per run.
Variants§
DuckDb
Reference consumer of Rivet Parquet — honors every native logical type (JSON, UUID, decimal, list) on autoload.
BigQuery
Cloud warehouse. Its Parquet autoloader is weaker than DuckDB’s: see
the per-type autoload_type notes in [bigquery].
Snowflake
Cloud warehouse. Like BigQuery, its Parquet autoload degrades JSON,
UUID, naive timestamps and TIME — see [snowflake]. Verified live.
Implementations§
Source§impl ExportTarget
impl ExportTarget
pub fn parse(s: &str) -> Option<Self>
pub fn label(self) -> &'static str
Sourcepub fn resolve_column(self, input: TargetInput<'_>) -> TargetColumnSpec
pub fn resolve_column(self, input: TargetInput<'_>) -> TargetColumnSpec
Resolve one already-mapped column against this target.
Sourcepub fn resolve_table(self, mappings: &[TypeMapping]) -> Vec<TargetColumnSpec>
pub fn resolve_table(self, mappings: &[TypeMapping]) -> Vec<TargetColumnSpec>
Resolve a whole table’s worth of columns, one spec per column in order.
Consumed today by the type-report’s recovery-SQL emission
(preflight::type_report); plan-load (ADR-0014 Phase B) would be a
second consumer.
Sourcepub fn recovery_sql(
self,
specs: &[TargetColumnSpec],
table: &str,
) -> Option<String>
pub fn recovery_sql( self, specs: &[TargetColumnSpec], table: &str, ) -> Option<String>
SQL that recovers target-native types after a bare autoload degraded
them (ADR-0014 L5). For BigQuery this is a CREATE TABLE … AS SELECT
over the autoloaded staging table applying per-column casts — BigQuery’s
Parquet loader will NOT coerce a declared native type on load (verified
against live BQ: BYTES→JSON, TIMESTAMP→DATETIME loads are rejected), so
the recovery has to be a post-load transform, not a load schema. None
when the target reads the interchange Parquet faithfully (DuckDB).
Trait Implementations§
Source§impl Clone for ExportTarget
impl Clone for ExportTarget
Source§fn clone(&self) -> ExportTarget
fn clone(&self) -> ExportTarget
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 ExportTarget
impl Debug for ExportTarget
Source§impl PartialEq for ExportTarget
impl PartialEq for ExportTarget
Source§fn eq(&self, other: &ExportTarget) -> bool
fn eq(&self, other: &ExportTarget) -> bool
self and other values to be equal, and is used by ==.impl Copy for ExportTarget
impl Eq for ExportTarget
impl StructuralPartialEq for ExportTarget
Auto Trait Implementations§
impl Freeze for ExportTarget
impl RefUnwindSafe for ExportTarget
impl Send for ExportTarget
impl Sync for ExportTarget
impl Unpin for ExportTarget
impl UnsafeUnpin for ExportTarget
impl UnwindSafe for ExportTarget
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.