How to print all attributes of a vertex in to a CSV file?

Hello, everyone. I am a beginner and trying to write GSQL queries about how to find the shortest path between two Vertex.
But the result is always shown as the primary id of the two Vertex and the Edge.
How can I print out all the other attributes of these two Vertex?
Thank you.

ListAccum<ListAccum> @path_list;
ListAccum<ListAccum> @new_list;
OrAccum @end_point;
ListAccum<ListAccum> @@total_path_list; // print all path as List
FILE f (file_path);
// 1. mark the target node as true
endset = {target_v};
endset = SELECT s
From endset:s
ACCUM s.@end_point = true;

// 2. start from the initial node, save the node to the patt_list, and find all nodes connected through the given name
Source = {v_source};
Source = SELECT s
FROM Source:s
ACCUM s.@path_list = [s];

WHILE Source.size() > 0 LIMIT depth DO
Source = SELECT t
FROM Source:s -(:e)- :t
ACCUM
FOREACH sequence IN s.@path_list DO
IF t.@end_point == true THEN
@@total_path_list += [sequence + [t]],
IF file_path != “” THEN
f.println([sequence + [t]])
END
ELSE IF sequence.contains(t) == FALSE THEN
t.@new_list += [sequence + [t]]
END
END
POST-ACCUM s.@path_list.clear();

  Source = SELECT t 
            FROM Source:t    
            POST-ACCUM t.@path_list = t.@new_list,
                       t.@new_list.clear()
            HAVING t.@path_list.size() > 0;

END;
// 3. return the final result
IF print_results THEN
PRINT @@total_path_list as path;
END;
}