I have a list of ids

```
[id1, id2, id3.......]

```

I would like to query all the rows such that ids match one of the id in the list

Right now I am doing it in a hacky way

```
# This is a python script
id_list_str = "`_id` = '" + str(_id[0]) + "' "

for m_id in _id[1:]:
    id_list_str += " OR `_id` = '" + str(m_txn_id) + "' "

hive_query = "SELECT" \
             "  `_id`, " \
             "  time, " \
             "  state " \
             "FROM " \
             "  transaction " \
             "WHERE " \
             "  %s " \
             % (id_list_str)

```

I don't think this scales as the number of id in my list increase, is there another way of doing this?

Thanks