def run_hive_script ( script ) : if not os . path . isfile ( script ) : raise RuntimeError ( "Hive script: {0} does not exist." . format ( script ) ) return run_hive ( [ '-f' , script ] )
python script for running hive query
Runs the contents of the given script in hive and returns stdout .
def run_hive_script(script):
    """
    Runs the contents of the given script in hive and returns stdout.
    """
    if not os.path.isfile(script):
        raise RuntimeError("Hive script: {0} does not exist.".format(script))
    return run_hive(['-f', script])