[][src]Struct pachyderm::pfs::PutFileRequest

pub struct PutFileRequest {
    pub file: Option<File>,
    pub value: Vec<u8>,
    pub url: String,
    pub recursive: bool,
    pub delimiter: i32,
    pub target_file_datums: i64,
    pub target_file_bytes: i64,
    pub header_records: i64,
    pub overwrite_index: Option<OverwriteIndex>,
    pub delete: bool,
}

Fields

file: Option<File>value: Vec<u8>url: Stringrecursive: bool

applies only to URLs that can be recursively walked, for example s3:// URLs

delimiter: i32

Delimiter causes data to be broken up into separate files with File.Path as a prefix.

target_file_datums: i64

TargetFileDatums specifies the target number of datums in each written file it may be lower if data does not split evenly, but will never be higher, unless the value is 0.

target_file_bytes: i64

TargetFileBytes specifies the target number of bytes in each written file, files may have more or fewer bytes than the target.

header_records: i64

header_records is an option for splitting data when 'delimiter' is not NONE (or SQL). It specifies the number of records that are converted to a header and applied to all file shards.

This is particularly useful for CSV files, where the first row often contains column titles; if 'header_records' is set to one in that case, the first row will be associated with the directory that contains the rest of the split-up csv rows as files, and if any data is retrieved from that directory by GetFile, it will appear to begin with that first row of column labels (including in pipeline workers).

Note that SQL files have their own logic for determining headers (their header is not a number of records, but a collection of SQL commands that create the relevant tables and such). This way, SQL files retrieved by GetFile can be passed to psql, and they will set up the appropriate tables before inserting the records in the files that were retrieved.

overwrite_index: Option<OverwriteIndex>

overwrite_index is the object index where the write starts from. All existing objects starting from the index are deleted.

delete: bool

delete indicates that the file should be deleted, this is redundant with DeleteFile, but is necessary because it allows you to send file deletes atomically with other PutFile operations.

Implementations

impl PutFileRequest[src]

pub fn delimiter(&self) -> Delimiter[src]

Returns the enum value of delimiter, or the default if the field is set to an invalid enum value.

pub fn set_delimiter(&mut self, value: Delimiter)[src]

Sets delimiter to the provided enum value.

Trait Implementations

impl Clone for PutFileRequest[src]

impl Debug for PutFileRequest[src]

impl Default for PutFileRequest[src]

impl Message for PutFileRequest[src]

impl PartialEq<PutFileRequest> for PutFileRequest[src]

impl StructuralPartialEq for PutFileRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]