def get_col_names(cursor, table):
    """
    Helper function to retrieve columns from  SQLite memory table
    :param cursor:
    :param table:
    :return:
    """
    cursor.execute('SELECT * FROM "{table}"'.format(table=table))
    return [member[0] for member in cursor.description]