Reputation: 63
I have created the below grakn schema
define
contract sub relation,
relates manufacturer,
relates product;
drug sub entity,
plays product,
has product_name,
has code;
company sub entity,
plays manufacturer,
has manufacturer_name;
product_name sub attribute,
datatype string;
manufacturer_name sub attribute,
datatype string;
code sub attribute,
datatype string;
I have 3 csv (drug, company and contract)
I am using the same migrate.py provided by grakn [modifying the names of the tables]. During ingestion the below error pops up.
<_Rendezvous of RPC that terminated with: status = StatusCode.INVALID_ARGUMENT details = "GraqlSemanticException-name doesn't have an 'isa', a 'sub' or an 'id'. Please check server logs for the stack trace." debug_error_string = "{"created":"@1588172437.178000000","description":"Error received from peer ipv4:127.0.0.1:48555","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"GraqlSemanticException-name doesn't have an 'isa', a 'sub' or an 'id'. Please check server logs for the stack trace.","grpc_status":3}" >
In the phone_calls example provided by grakn I see ID being generated (is it generated automatically?) I need to insert data into the fields (company, contracts and drug). If required I can share the migrate.py which i have written.
Upvotes: 3
Views: 366
Reputation: 46
Please check the names used in your migrate.py and csv files. Both should be same to insert the data into grakn-DB. Example: If your query is like:
'insert $company isa company, has name "' + company["name"] + '";'
So in your csv file the header should be "name". Hope this helps.
Upvotes: 3