pub struct ExportParams {
pub sql: Option<String>,
pub table: Option<String>,
pub path: String,
pub format: String,
pub overwrite: Option<bool>,
pub format_options: Option<Value>,
pub database: Option<String>,
}Expand description
Parameters for the export tool.
Fields§
§sql: Option<String>SQL query to export (if omitted, exports whole table)
table: Option<String>Table name (used if sql omitted)
path: StringOutput file path
format: StringFormat: csv, parquet, arrow_ipc, iceberg, or hyper. For iceberg
the path is a directory that hyperd will create (the table
root with a metadata/ and data/ subdir); for all other
formats it is a single file.
overwrite: Option<bool>If false, refuse to overwrite an existing file at path and return
a PERMISSION_DENIED error instead. Defaults to true (overwrite
silently) to match pre-flag behavior.
format_options: Option<Value>Optional per-format options passed through into hyperd’s COPY (query) TO '…' WITH (…) clause. Keys must match hyperd’s own
option names exactly; values must be strings, numbers, or
booleans (null / nested object / array are rejected). Common
knobs:
- parquet —
codec("snappy"default,"zstd","gzip","uncompressed", …),rows_per_row_group(int). - iceberg — everything Parquet accepts, plus
table_scheme("metastore"default,"filesystem"),max_file_size(bytes; split data across multiple parquet files). - csv —
header(bool, default true),delimiter(1-char string, default","),null(string printed for NULL, default""),quote(1-char string). arrow_ipc— none commonly needed.
Ignored for format = "hyper" (which isn’t a COPY).
database: Option<String>Source database alias. Omit to read from the ephemeral primary.
Pass "persistent" or a user-attached alias to export from there.
In table mode, the table name is fully qualified against this
database. In sql mode, unqualified names in the SQL resolve
against this database for the duration of the call.
Trait Implementations§
Source§impl Debug for ExportParams
impl Debug for ExportParams
Source§impl<'de> Deserialize<'de> for ExportParams
impl<'de> Deserialize<'de> for ExportParams
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 ExportParams
impl JsonSchema for ExportParams
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 moreAuto Trait Implementations§
impl Freeze for ExportParams
impl RefUnwindSafe for ExportParams
impl Send for ExportParams
impl Sync for ExportParams
impl Unpin for ExportParams
impl UnsafeUnpin for ExportParams
impl UnwindSafe for ExportParams
Blanket Implementations§
impl<T> Allocation for T
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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