This isn’t really a composite key but more like an additional unique index.
E.G. you could not have two course with the same name even if the years were different and you could not have two courses for the sale year. I don’t think you want to use the
@id in this situation.
But as far as formatting an RDF to types that have a @id field, there is nothing special to do differently than importing rdf data to a type not containing a @id field.
The thing to keep in mind and know is that the @id applies logic to the GraphQL API only. This means you could unintentionally import data that did not have unique values for that field and Dgraph would happily ingest.
Even if the GraphQL schema does not show a field mapped to the ID (Dgraph UID) there is still one in the underlying data. The “id” for those types is the same as any other type. To prove this use that schema and add some data through mutations. Then modify the schema and add a
id: ID field and query the data again. Changing the schema does not change the data but it can provide access to data that is already there just not visible to the GraphQL API.