MCPcopy
hub / github.com/dlt-hub/dlt / setup_pipeline

Method setup_pipeline

tests/load/utils.py:293–312  ·  view source on GitHub ↗

Convenience method to setup pipeline with this configuration

(
        self, pipeline_name: str, dataset_name: str = None, dev_mode: bool = False, **kwargs
    )

Source from the content-addressed store, hash-verified

291 os.environ[k] = v
292
293 def setup_pipeline(
294 self, pipeline_name: str, dataset_name: str = None, dev_mode: bool = False, **kwargs
295 ) -> dlt.Pipeline:
296 """Convenience method to setup pipeline with this configuration"""
297
298 self.dev_mode = dev_mode
299 destination = kwargs.pop("destination", None)
300 if destination is None:
301 destination = self.destination_factory(**kwargs)
302 else:
303 self.setup()
304 pipeline = dlt.pipeline(
305 pipeline_name=pipeline_name,
306 destination=destination,
307 staging=kwargs.pop("staging", self.staging),
308 dataset_name=dataset_name if dataset_name is not None else pipeline_name + "_data",
309 dev_mode=dev_mode,
310 **kwargs,
311 )
312 return pipeline
313
314 def attach_pipeline(self, pipeline_name: str, **kwargs) -> dlt.Pipeline:
315 """Attach to existing pipeline keeping the dev_mode"""

Calls 3

destination_factoryMethod · 0.95
setupMethod · 0.95
pipelineMethod · 0.80