Weird Error Message when creating loading job - Encountered " "\"" "\" ""

Hello TigerGraph Team,

I have encountered an error when creating a loading job via GSQL server. Can anyone explain to me where this \ comes from? Thanks !

Please see attached.

hi, can you put the script in a file,e.g. load.gsql, and try to enter gsql shell, and run the file?

GSQL> @load.gsql
If it still gives the error, can you paste the loading script here? I can copy and paste to reproduce on my end.

thanks,
mingxi

2 Likes

@luyilun32661 Try to check if you have some special characters. I just experienced similar problem and the solution was to cat the file with -t as option (cat -t yourfile.gsql). Here the result:

CREATE VERTEX ProductCategory(P^@r^@o^@d^@u^@c^@t^@C^@a^@t^@e^@g^@o^@r^@y^@I^@D^@^@ UINT PRIMARY KEY^@^@,^@ N^@a^@m^@e^ @^@ STRING) WITH STATS="OUTDEGREE_BY_EDGETYPE"

and should be like this:

    CREATE VERTEX ProductCategory(ProductCategoryID UINT PRIMARY KEY, Name STRING) WITH STATS="OUTDEGREE_BY_EDGETYPE"

I don’t have a clue how it could happen, was using Atom editor as always…

1 Like

Hello mingxi, thanks for the reply.

I tried what you suggested but gsql kept telling me that my .gsql file does not exist. I have put the .gsql file under /home/tigergraph but it did not seem to work.

I also pasted the script so you can try to reproduce the error on your end:

begin
create loading job load_graph for
graph cbit_sna {
define filename Person="/home/tigergraph/Person.csv";
define filename Car="/home/tigergraph/Car.csv";
define filename Accident="/home/tigergraph/Accident.csv";
define filename Inspector="/home/tigergraph/Inspector.csv";
define filename Claim="/home/tigergraph/Claim.csv”;
define filename Policy="/home/tigergraph/Policy.csv”;
define filename BodyShop="/home/tigergraph/BodyShop.csv”;
define filename InsuranceCompany="/home/tigergraph/InsuranceCompany.csv”;
load Person to vertex Person values ($"id", $"name", $"id_type", $"address", $"telephone", $"id_area", $"birth_date", $"sex") using header="true", separator=",";
load Car to vertex Car values ($"plate_no", $"vin", $"register_date", $"engineno", $"purchase_price", $"current_price") using header="true", separator=",";
load Accident to vertex Accident values ($"accident_id", $"accident_time", $"accident_location") using header="true", separator=",";
load Inspector to vertex Inspector values ($"inspector_name", $"inspector_no") using header="true", separator=“,”;
load Claim to vertex Claim values ($"claim_id", $"claim_amount") using header="true", separator=",";
load Policy to vertex Policy values ($"policy_id", $"start_date", $"end_date", $"agent_name") using header="true", separator=",";
load BodyShop to vertex BodyShop values ($"shop_name") using header="true", separator=",";
load InsuranceCompany to vertex InsuranceCompany values ($"company_id") using header="true", separator=","
}
end

indent preformatted text by 4 spaces

Thanks

Thanks for your reply Bruno. I will give it a try.

Input method error. Some colons are inputted as the chinese input method. At the end of the 7,8,9,10 line, the colon is Chinese input method style. Some lines miss “;”. The file works well after correcting these input errors. The modified file is as below:

create loading job load_graph for
graph cbit_sna {
define filename Person="/home/tigergraph/Person.csv";
define filename Car="/home/tigergraph/Car.csv";
define filename Accident="/home/tigergraph/Accident.csv";
define filename Inspector="/home/tigergraph/Inspector.csv";
define filename Claim="/home/tigergraph/Claim.csv";
define filename Policy="/home/tigergraph/Policy.csv";
define filename BodyShop="/home/tigergraph/BodyShop.csv";
define filename InsuranceCompany="/home/tigergraph/InsuranceCompany.csv";
load Person to vertex Person values ($"id", $"name", $"id_type", $"address", $"telephone", 
$"id_area", $"birth_date", $"sex") using header="true", separator=",";
load Car to vertex Car values ($"plate_no", $"vin", $"register_date", $"engineno", $"purchase_price", 
$"current_price") using header="true", separator=",";
load Accident to vertex Accident values ($"accident_id", $"accident_time", $"accident_location") 
using header="true", separator=",";
load Inspector to vertex Inspector values ($"inspector_name", $"inspector_no") using header="true", 
separator=",";
load Claim to vertex Claim values ($"claim_id", $"claim_amount") using header="true", separator=",";
load Policy to vertex Policy values ($"policy_id", $"start_date", $"end_date", $"agent_name") using 
header="true", separator=",";
load BodyShop to vertex BodyShop values ($"shop_name") using header="true", separator=",";
load InsuranceCompany to vertex InsuranceCompany values ($"company_id") using header="true", 
separator=",";
}

I have corrected the chinese quotation marks and now the error is gone. Thank you Ylhao!

1 Like