Formatting list of queries in python
You can eliminate the .close() using a with ... as ...: statement.

Since newlines are white-space characters, re.sub('\s+', ' ', ...) will already convert any '\n' characters to a space, so the .replace('\n', ' ') is unnecessary.

And you don't need to write everything on one line, even when you
want a "one-liner".

with open(args.hql, 'r') as fdHql:
    queries = [
               re.sub('\s+', ' ', each.strip())
                   .replace('( ', '(')
                   .replace(' )', ')')
                   .replace(' ,', ',')
               for each in fdHql.read().split(';')
              ]


Of course, the clearest is to move the work to a helper function.

def _format_sql(sql):
    return re.sub('\s+', ' ', sql.strip())      \
               .replace('( ', '(')              \
               .replace(' )', ')')              \
               .replace(' ,', ',')

with open(args.hql, 'r') as fdHql:
    queries = [ _format_sql(each) for each in fdHql.read().split(';') ]