Creates a deep copy of the source where copies of schema, resources and pipes are created. If `with_name` is provided, a schema is cloned with a changed name
(self, with_name: str = None)
| 581 | return source_state() |
| 582 | |
| 583 | def clone(self, with_name: str = None) -> "DltSource": |
| 584 | """Creates a deep copy of the source where copies of schema, resources and pipes are created. |
| 585 | |
| 586 | If `with_name` is provided, a schema is cloned with a changed name |
| 587 | """ |
| 588 | # mind that resources and pipes are cloned when added to the DltResourcesDict in the source constructor |
| 589 | return DltSource( |
| 590 | self.schema.clone(with_name=with_name), self.section, list(self._resources.values()) |
| 591 | ) |
| 592 | |
| 593 | def __iter__(self) -> Generator[TDataItem, None, None]: |
| 594 | """Opens iterator that yields the data items from all the resources within the source in the same order as in Pipeline class. |