Add accessor support for composites.
Convert example to dataset API.