raptor write to database