Skip to content

QuokkaContext.get_config

Gets a config value for the entire cluster.

Parameters:

Name Type Description Default
key str

the key to get

required

Returns:

Name Type Description
any

the value of the key

Examples:

>>> from pyquokka.df import *
>>> qc = QuokkaContext()
>>> qc.get_config("optimize_joins")
Source code in pyquokka/df.py
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
def get_config(self, key):

    """
    Gets a config value for the entire cluster.

    Args:
        key (str): the key to get

    Returns:
        any: the value of the key

    Examples:

        >>> from pyquokka.df import *
        >>> qc = QuokkaContext()
        >>> qc.get_config("optimize_joins")

    """

    if key in self.sql_config:
        return self.sql_config[key]
    elif key in self.exec_config:
        return self.exec_config[key]
    else:
        raise Exception("key not found in config")