@staticmethod
def build_command_line_parameters(params, command_name='-param'):
    """
        builds a string for ``pig`` based on the parameters in params

        @param      params          dictionary
        @param      command_name    ``-param`` or ``-hiveconf``
        @return                     string

        .. versionadded:: 1.1
        """
    if params is None:
        return ''
    res = []
    for k, v in sorted(params.items()):
        if '"' in v:
            v = v.replace('"', '\\"')
        one = '{2} {0}="{1}"'.format(k, v, command_name)
        res.append(one)
    return ' '.join(res)
