Import errors: Attr should have @lang directive in schema to mutate edge

Dgraph has its own schema where you can specify the types and indices for each predicate in Dgraph.

The schema can be set up-front as a file you pass to the live loader. e.g., the schema file can look like this (say, in a file named schema.txt):

<predicate1>: string @lang .
<predicate2>: string @lang .
<predicate3>: string @lang .

Then you can pass this to live loader with the -s flag:

dgraph live -r data.rdf.gz -s schema.txt

More about the format of making schema changes is in the docs: https://docs.dgraph.io/query-language/#adding-or-modifying-schema

1 Like