def _sqlfile_to_statements(sql):
    """
    Takes a SQL string containing 0 or more statements and returns a 
    list of individual statements as strings. Comments and
    empty statements are ignored.
    """
    statements = (sqlparse.format(stmt, strip_comments=True).strip() for stmt in sqlparse.split(sql))
    return [stmt for stmt in statements if stmt]
Takes a SQL string containing 0 or more statements and returns a 
    list of individual statements as strings. Comments and
    empty statements are ignored.