def export_view_to_csv(tablename, filters): query = "SELECT * FROM " + tablename + " WHERE " + filters filename = tablename + '_filtered_' + filename_timestr() + '.csv' export_to_csv(tablename, query, filename)
def export_table_to_csv(tablename): query = "SELECT * FROM " + tablename filename = tablename + '_' + filename_timestr() + '.csv' export_to_csv(tablename, query, filename)