@@ -66,21 +66,21 @@ def test_extracts_parameters_algo_write() -> None:
6666 gds_query_runner .set__mock_result (DataFrame ([{"databaseLocation" : "remote" }]))
6767 qr = AuraDbQueryRunner (gds_query_runner , db_query_runner , FakeArrowClient (), False ) # type: ignore
6868
69- qr .call_procedure (endpoint = "gds.degree.write" , params = CallParameters (graph_name = "g" , config = {}))
69+ qr .call_procedure (endpoint = "gds.degree.write" , params = CallParameters (graph_name = "g" , config = {"jobId" : "my-job" }))
7070
7171 assert gds_query_runner .last_query () == "CALL gds.degree.write($graph_name, $config)"
7272 assert gds_query_runner .last_params () == {
7373 "graph_name" : "g" ,
74- "config" : {"writeToResultStore" : True },
74+ "config" : {"jobId" : "my-job" , " writeToResultStore" : True },
7575 }
7676 assert (
7777 db_query_runner .last_query ()
78- == "CALL gds.arrow.write($graphName, $databaseName, $writeConfiguration , $arrowConfiguration)"
78+ == "CALL gds.arrow.write($graphName, $databaseName, $jobId , $arrowConfiguration)"
7979 )
8080 assert db_query_runner .last_params () == {
8181 "graphName" : "g" ,
8282 "databaseName" : "dummy" ,
83- "writeConfiguration " : { "nodeLabels" : [ "*" ]} ,
83+ "jobId " : "my-job" ,
8484 "arrowConfiguration" : {"encrypted" : False , "host" : "myHost" , "port" : "1234" , "token" : "myToken" },
8585 }
8686
@@ -96,23 +96,23 @@ def test_arrow_and_write_configuration() -> None:
9696 endpoint = "gds.degree.write" ,
9797 params = CallParameters (
9898 graph_name = "g" ,
99- config = {"arrowConfiguration" : {"batchSize" : 1000 }, "writeConfiguration " : { "writeMode" : "FOOBAR" } },
99+ config = {"arrowConfiguration" : {"batchSize" : 1000 }, "jobId " : "my-job" },
100100 ),
101101 )
102102
103103 assert gds_query_runner .last_query () == "CALL gds.degree.write($graph_name, $config)"
104104 assert gds_query_runner .last_params () == {
105105 "graph_name" : "g" ,
106- "config" : {"writeToResultStore" : True },
106+ "config" : {"writeToResultStore" : True , "jobId" : "my-job" },
107107 }
108108 assert (
109109 db_query_runner .last_query ()
110- == "CALL gds.arrow.write($graphName, $databaseName, $writeConfiguration , $arrowConfiguration)"
110+ == "CALL gds.arrow.write($graphName, $databaseName, $jobId , $arrowConfiguration)"
111111 )
112112 assert db_query_runner .last_params () == {
113113 "graphName" : "g" ,
114114 "databaseName" : "dummy" ,
115- "writeConfiguration " : { "nodeLabels" : [ "*" ], "writeMode" : "FOOBAR" } ,
115+ "jobId " : "my-job" ,
116116 "arrowConfiguration" : {
117117 "encrypted" : False ,
118118 "host" : "myHost" ,
@@ -136,7 +136,7 @@ def test_arrow_and_write_configuration_graph_write() -> None:
136136 graph_name = "g" ,
137137 properties = [],
138138 entities = [],
139- config = {"arrowConfiguration" : {"batchSize" : 42 }, "writeConfiguration " : { "writeMode" : "FOOBAR" } },
139+ config = {"arrowConfiguration" : {"batchSize" : 42 }, "jobId " : "my-job" },
140140 ),
141141 )
142142
@@ -148,16 +148,16 @@ def test_arrow_and_write_configuration_graph_write() -> None:
148148 "graph_name" : "g" ,
149149 "entities" : [],
150150 "properties" : [],
151- "config" : {"writeToResultStore" : True },
151+ "config" : {"writeToResultStore" : True , "jobId" : "my-job" },
152152 }
153153 assert (
154154 db_query_runner .last_query ()
155- == "CALL gds.arrow.write($graphName, $databaseName, $writeConfiguration , $arrowConfiguration)"
155+ == "CALL gds.arrow.write($graphName, $databaseName, $jobId , $arrowConfiguration)"
156156 )
157157 assert db_query_runner .last_params () == {
158158 "graphName" : "g" ,
159159 "databaseName" : "dummy" ,
160- "writeConfiguration " : { "nodeLabels" : [], "nodeProperties" : [], "writeMode" : "FOOBAR" } ,
160+ "jobId " : "my-job" ,
161161 "arrowConfiguration" : {
162162 "encrypted" : False ,
163163 "host" : "myHost" ,
0 commit comments