def get_tables(job):
    """Return the tables to be indexed."""
    table_names = []
    tables_to_skip = job.tables_to_skip()
    tables_to_keep = job.tables_to_keep()

    if tables_to_keep == ['*']:
        table_names = [tbl.name for tbl in job.dynamodb.tables.iterator()]
    else:
        table_names = job.tables_to_keep()

    if tables_to_skip:
        for ts in tables_to_skip():
            [table_names.remove(tbl) for tbl in job.dynamodb.tables.iterator() if ts == tbl]

    return table_names