try to derive ID from upsert query