ReadStatCliCommands

Enum ReadStatCliCommands 

Source
pub enum ReadStatCliCommands {
    Metadata {
        input: PathBuf,
        as_json: bool,
        no_progress: bool,
        skip_row_count: bool,
    },
    Preview {
        input: PathBuf,
        rows: u32,
        reader: Option<Reader>,
        stream_rows: Option<u32>,
        no_progress: bool,
        columns: Option<Vec<String>>,
        columns_file: Option<PathBuf>,
    },
    Data {
Show 15 fields input: PathBuf, output: Option<PathBuf>, format: Option<CliOutFormat>, overwrite: bool, rows: Option<u32>, reader: Option<Reader>, stream_rows: Option<u32>, no_progress: bool, parallel: bool, parallel_write: bool, parallel_write_buffer_mb: u64, compression: Option<CliParquetCompression>, compression_level: Option<u32>, columns: Option<Vec<String>>, columns_file: Option<PathBuf>,
}, }
Expand description

CLI subcommands for readstat.

Variants§

§

Metadata

Display sas7bdat metadata

Fields

§input: PathBuf

Path to sas7bdat file

§as_json: bool

Display sas7bdat metadata as json

§no_progress: bool

Do not display progress bar

§skip_row_count: bool

Skip calculating row count{n}If only interested in variable metadata speeds up parsing

§

Preview

Preview sas7bdat data

Fields

§input: PathBuf

Path to sas7bdat file

§rows: u32

Number of rows to write

§reader: Option<Reader>

Type of reader{n} mem = read all data into memory{n} stream = read at most stream-rows into memory{n}Defaults to stream

§stream_rows: Option<u32>

Number of rows to stream (read into memory) at a time{n}↑ rows = ↑ memory usage{n}Ignored if reader is set to mem{n}Defaults to 10,000 rows

§no_progress: bool

Do not display progress bar

§columns: Option<Vec<String>>

Comma-separated list of column names to include in output

§columns_file: Option<PathBuf>

Path to a file containing column names (one per line, # comments)

§

Data

Convert sas7bdat data to csv, feather (or the Arrow IPC format), ndjson, or parquet format

Fields

§input: PathBuf

Path to sas7bdat file

§output: Option<PathBuf>

Output file path

§format: Option<CliOutFormat>

Output file format{n}Defaults to csv

§overwrite: bool

Overwrite output file if it already exists

§rows: Option<u32>

Number of rows to write

§reader: Option<Reader>

Type of reader{n} mem = read all data into memory{n} stream = read at most stream-rows into memory{n}Defaults to stream

§stream_rows: Option<u32>

Number of rows to stream (read into memory) at a time{n}↑ rows = ↑ memory usage{n}Ignored if reader is set to mem{n}Defaults to 10,000 rows

§no_progress: bool

Do not display progress bar

§parallel: bool

Convert sas7bdat data in parallel

§parallel_write: bool

Write output data in parallel{n}Only effective when parallel is enabled{n}May write batches out of order for Parquet/Feather

§parallel_write_buffer_mb: u64

Memory buffer size in MB before spilling to disk during parallel writes{n}Defaults to 100 MB{n}Only effective when parallel-write is enabled

§compression: Option<CliParquetCompression>

Parquet compression algorithm

§compression_level: Option<u32>

Parquet compression level (if applicable)

§columns: Option<Vec<String>>

Comma-separated list of column names to include in output

§columns_file: Option<PathBuf>

Path to a file containing column names (one per line, # comments)

Trait Implementations§

Source§

impl Debug for ReadStatCliCommands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for ReadStatCliCommands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for ReadStatCliCommands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,