'This function prepares a list of hiveconf params
from a dictionary of key value pairs.
:param d:
:type d: dict
>>> hh = HiveCliHook()
>>> hive_conf = {"hive.exec.dynamic.partition": "true",
... "hive.exec.dynamic.partition.mode": "nonstrict"}
>>> hh._prepare_hiveconf(hive_conf)
["-hiveconf", "hive.exec.dynamic.partition=true", "-hiveconf", "hive.exec.dynamic.partition.mode=nonstrict"]'

def _prepare_hiveconf(self, d):

    if (not d):
        return []
    return as_flattened_list(itertools.izip((['-hiveconf'] * len(d)), ['{}={}'.format(k, v) for (k, v) in d.items()]))
