Config utils
Module to read configurations.
ConfigUtils
¶
Bases: object
Config utilities class.
Source code in mkdocs/lakehouse_engine/packages/utils/configs/config_utils.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
get_acon(acon_path=None, acon=None, disable_dbfs_retry=False)
classmethod
¶
Get acon based on a filesystem path or on a dict.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
acon_path |
Optional[str]
|
path of the acon (algorithm configuration) file. |
None
|
acon |
Optional[dict]
|
acon provided directly through python code (e.g., notebooks or other apps). |
None
|
disable_dbfs_retry |
bool
|
optional flag to disable file storage dbfs. |
False
|
Returns:
Type | Description |
---|---|
dict
|
Dict representation of an acon. |
Source code in mkdocs/lakehouse_engine/packages/utils/configs/config_utils.py
get_config(package='lakehouse_engine.configs')
staticmethod
¶
Get the lakehouse engine configuration file.
Returns:
Type | Description |
---|---|
Any
|
Configuration dictionary |
Source code in mkdocs/lakehouse_engine/packages/utils/configs/config_utils.py
get_config_from_file(config_file_path)
staticmethod
¶
Get the lakehouse engine configurations using a file path.
Args: config_file_path: a string with a path for a yaml file with custom configurations.
Returns:
Type | Description |
---|---|
Any
|
Configuration dictionary |
Source code in mkdocs/lakehouse_engine/packages/utils/configs/config_utils.py
get_engine_version()
classmethod
¶
Get Lakehouse Engine version from the installed packages.
Returns:
Type | Description |
---|---|
str
|
String of engine version. |
Source code in mkdocs/lakehouse_engine/packages/utils/configs/config_utils.py
read_json_acon(path, disable_dbfs_retry=False)
staticmethod
¶
Read an acon (algorithm configuration) file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
path to the acon file. |
required |
disable_dbfs_retry |
bool
|
optional flag to disable file storage dbfs. |
False
|
Returns:
Type | Description |
---|---|
Any
|
The acon file content as a dict. |
Source code in mkdocs/lakehouse_engine/packages/utils/configs/config_utils.py
read_sql(path, disable_dbfs_retry=False)
staticmethod
¶
Read a DDL file in Spark SQL format from a cloud object storage system.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
path to the SQL file. |
required |
disable_dbfs_retry |
bool
|
optional flag to disable file storage dbfs. |
False
|
Returns:
Type | Description |
---|---|
Any
|
Content of the SQL file. |
Source code in mkdocs/lakehouse_engine/packages/utils/configs/config_utils.py
remove_sensitive_info(dict_to_replace)
classmethod
¶
Remove sensitive info from a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dict_to_replace |
Union[dict, list]
|
dict where we want to remove sensitive info. |
required |
Returns:
Type | Description |
---|---|
Union[dict, list]
|
dict without sensitive information. |