Module core.datasources.base_datasource

Base Class for all ZenML datasources

Classes

BaseDatasource(name: str, schema: Dict = None, *args, **kwargs) : Base class for all ZenML datasources.

Every ZenML datasource should override this class.

Construct the datasource

Args:
    name (str): name of datasource
    schema (dict): schema of datasource
    _id: unique ID (for internal use)

### Class variables

`DATA_STEP`
:

`PREFIX`
:

### Static methods

`from_config(config: Dict)`
:   Convert from Data Step config to ZenML Datasource object.
    
    Data step is also populated and configuration set to parameters set
    in the config file.
    
    Args:
        config: a DataStep config in dict-form (probably loaded from YAML).

`get_name_from_pipeline_name(pipeline_name: str)`
:

### Methods

`get_data_step(self)`
:

`get_datapoints(self)`
:   Gets total number of datapoints in datasource

`get_pipeline_name_from_name(self)`
:

`sample_data(self, sample_size: int = 100000)`
:   Sampels data from datasource as a pandas DataFrame.
    
    Args:
        sample_size: # of rows to sample.

`to_config(self)`
:   Converts datasource to ZenML config block.

`view_schema(self)`
:   View schema of data flowing in pipeline.

`view_statistics(self)`
:   View statistics of data flowing in pipeline.