How to filtering value column for load data using script gsql

Suppose I have data:

TYPE | PHONE
LOC | 9821122222
POC | 9821122212
POC | 9821127121
LOC | 9821112121
POC | 9821192121

how do I make the script load data gsql filtering type for only LOC values to load data TYPE?

USE GRAPH MyGraph
CREATE LOADING JOB script_load FOR GRAPH MyGraph{
    DEFINE FILENAME MyDataSource;
    LOAD MyDataSource TO VERTEX event VALUES($1, $0) USING SEPARATOR="|", HEADER="true", EOL="\n";
}

in column value $0 what should i add to fulfill filtering only value LOC ?

@maulcenter You can use the WHERE clause in your loading job. Let me know if that helps.

1 Like