dlt.pipeline.pipeline
Pipeline Objects
class Pipeline(SupportsPipeline)
attached_pipeline
Pipeline got attached to existing working dir
pipelines_dir
A directory where the pipelines' working directories are created
is_active
Tells if instance is currently active and available via dlt.pipeline()
__init__
def __init__(pipeline_name: str,
pipelines_dir: str,
pipeline_salt: TSecretStrValue,
destination: AnyDestination,
staging: AnyDestination,
dataset_name: str,
import_schema_path: str,
export_schema_path: str,
dev_mode: bool,
progress: _Collector,
must_attach_to_local_pipeline: bool,
config: PipelineConfiguration,
refresh: Optional[TRefreshMode] = None) -> None
Initializes the Pipeline class which implements dlt pipeline. Please use pipeline function in dlt module to create a new Pipeline instance.
drop
def drop(pipeline_name: str = None) -> "Pipeline"
Deletes local pipeline state, schemas and any working files. Re-initializes
all internal fields via init. If pipeline_name is specified that is
different from the current name, new pipeline instance is created, activated and returned.
Note that original pipeline is still dropped.
Arguments:
pipeline_namestr - Optional. New pipeline name. Creates and activates new instance
Returns:
"Pipeline"- returns self
extract
@with_runtime_trace()
@with_state_sync(may_extract_state=True)
@with_schemas_sync
@with_config_section((known_sections.EXTRACT, ))
def extract(
data: Any,
*,
table_name: str = None,
parent_table_name: str = None,
write_disposition: TWriteDispositionConfig = None,
columns: TAnySchemaColumns = None,
primary_key: TColumnNames = None,
schema: Schema = None,
max_parallel_items: int = ConfigValue,
workers: int = ConfigValue,
table_format: TTableFormat = None,
schema_contract: TSchemaContract = None,
refresh: Optional[TRefreshMode] = None,
loader_file_format: Optional[TLoaderFileFormat] = None) -> ExtractInfo
Extracts the data and prepare it for the normalization. Does not require destination or credentials to be configured. See run method for the arguments' description.
normalize
@with_runtime_trace()
@with_schemas_sync
@with_config_section((known_sections.NORMALIZE, ))
def normalize(workers: int = 1) -> NormalizeInfo
Normalizes the data prepared with extract method, infers the schema and creates load packages for the load method. Requires destination to be known.