Optimizers
Optimizers module.
Optimizers
¶
Bases: object
Class containing all the functions that can provide optimizations.
Source code in mkdocs/lakehouse_engine/packages/transformers/optimizers.py
cache()
classmethod
¶
Caches the current dataframe.
The default storage level used is MEMORY_AND_DISK.
Returns:
Type | Description |
---|---|
Callable
|
A function to be called in .transform() spark function. |
Source code in mkdocs/lakehouse_engine/packages/transformers/optimizers.py
persist(storage_level=None)
classmethod
¶
Caches the current dataframe with a specific StorageLevel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
storage_level |
str
|
the type of StorageLevel, as default MEMORY_AND_DISK_DESER. More options here. |
None
|
Returns:
Type | Description |
---|---|
Callable
|
A function to be called in .transform() spark function. |
Source code in mkdocs/lakehouse_engine/packages/transformers/optimizers.py
unpersist(blocking=False)
classmethod
¶
Removes the dataframe from the disk and memory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
blocking |
bool
|
whether to block until all the data blocks are removed from disk/memory or run asynchronously. |
False
|
Returns:
Type | Description |
---|---|
Callable
|
A function to be called in .transform() spark function. |