DataSpec

Trait DataSpec 

Source
pub trait DataSpec {
    // Required methods
    fn name(&self) -> String;
    fn row_noun(&self) -> String;
    fn inputs(&self) -> Vec<InputDataset>;
    fn transform(
        &self,
        warehouse: &DataWarehouse,
        start_block: Option<u32>,
        end_block: Option<u32>,
    ) -> Result<DataFrame, EtopError>;
    fn default_columns(&self) -> Option<Vec<String>>;
    fn default_column_formats(
        &self,
    ) -> Option<HashMap<String, ColumnFormatShorthand>>;
}
Expand description

specification for dataset

Required Methods§

Source

fn name(&self) -> String

name of dataset

Source

fn row_noun(&self) -> String

plural noun of what the rows are

Source

fn inputs(&self) -> Vec<InputDataset>

which datasets the view is constructed from

Source

fn transform( &self, warehouse: &DataWarehouse, start_block: Option<u32>, end_block: Option<u32>, ) -> Result<DataFrame, EtopError>

transform inputs into the data needed for a view

Source

fn default_columns(&self) -> Option<Vec<String>>

default columns

Source

fn default_column_formats( &self, ) -> Option<HashMap<String, ColumnFormatShorthand>>

default format for each column

Implementors§