Attributes missing from data

Hi,
I load in data like so:

CSV - system.csv:

“system_id”
“AAA 222”
“BBBB111”

Load job:

CREATE LOADING JOB load_ty FOR GRAPH ty {
    DEFINE FILENAME file3="/home/tigergraph/mydata/system.csv";
    LOAD file3 TO VERTEX system_ VALUES ($"system_id") USING header="true", separator=",",QUOTE="double";
}

But then looking at the data, it appears the attributes are missing:

GSQL-Dev > select * from system_ limit 1
[{
  "v_id": "AAA 222",
  "attributes": {},
  "v_type": "system_"
}]

And this causes problems when I try to access it in a query like so:

CREATE OR REPLACE QUERY searchSystem(STRING sys_in) FOR GRAPH ty SYNTAX v2 {
   
    SystemsAll = {system_.*};
   
    systemRes = select s1 from SystemsAll:s1 WHERE s1.system_id == sys_in;
   
    print systemRes;
   
}

It complains that “s1.system_id does not conform to any of [system_] supported here”

How do I get the primary ID to also be an attribute?

I realise that I can pass it in as a VERTEX into the argument of the function, but the problem here is that I want to find the system again in another query to overcome the single parameter input limitation of GSQL (see my related question on circular queries). So I need to be able to look it up in a subsequent query, I can’t reuse start, because I’m using the returned vertex set of a prior query.

Cheers,
Rene

Hi,

Please take a look at our documentation : docs.tigergraph.com

On the defining a schema page, it explains and shows how you can use the primary ID as an attribute : https://docs.tigergraph.com/dev/gsql-ref/ddl-and-loading/defining-a-graph-schema#create-vertex

-Kevin