flow adapter insert queries and query to update levels as done