1
- from typing import Any , List , Optional
1
+ from typing import List , Optional
2
2
3
3
from pandas import DataFrame
4
4
5
- from .arrow_config_converter import ArrowConfigConverter
5
+ from graphdatascience .procedure_surface .config_converter import ConfigConverter
6
+
6
7
from ...arrow_client .authenticated_arrow_client import AuthenticatedArrowClient
7
8
from ...arrow_client .v2 .job_client import JobClient
8
9
from ...arrow_client .v2 .mutation_client import MutationClient
@@ -34,18 +35,18 @@ def mutate(
34
35
consecutive_ids : Optional [bool ] = None ,
35
36
relationship_weight_property : Optional [str ] = None ,
36
37
) -> WccMutateResult :
37
- config = ArrowConfigConverter . build_configuration (
38
- G ,
39
- concurrency = concurrency ,
40
- consecutive_ids = consecutive_ids ,
41
- job_id = job_id ,
42
- log_progress = log_progress ,
43
- node_labels = node_labels ,
44
- relationship_types = relationship_types ,
45
- relationship_weight_property = relationship_weight_property ,
46
- seed_property = seed_property ,
47
- sudo = sudo ,
48
- threshold = threshold ,
38
+ config = ConfigConverter . convert_to_gds_config (
39
+ graph_name = G . name () ,
40
+ concurrency = concurrency ,
41
+ consecutive_ids = consecutive_ids ,
42
+ job_id = job_id ,
43
+ log_progress = log_progress ,
44
+ node_labels = node_labels ,
45
+ relationship_types = relationship_types ,
46
+ relationship_weight_property = relationship_weight_property ,
47
+ seed_property = seed_property ,
48
+ sudo = sudo ,
49
+ threshold = threshold ,
49
50
)
50
51
51
52
job_id = JobClient .run_job_and_wait (self ._arrow_client , WCC_ENDPOINT , config )
@@ -79,18 +80,18 @@ def stats(
79
80
consecutive_ids : Optional [bool ] = None ,
80
81
relationship_weight_property : Optional [str ] = None ,
81
82
) -> WccStatsResult :
82
- config = ArrowConfigConverter . build_configuration (
83
- G ,
84
- concurrency = concurrency ,
85
- consecutive_ids = consecutive_ids ,
86
- job_id = job_id ,
87
- log_progress = log_progress ,
88
- node_labels = node_labels ,
89
- relationship_types = relationship_types ,
90
- relationship_weight_property = relationship_weight_property ,
91
- seed_property = seed_property ,
92
- sudo = sudo ,
93
- threshold = threshold ,
83
+ config = ConfigConverter . convert_to_gds_config (
84
+ graph_name = G . name () ,
85
+ concurrency = concurrency ,
86
+ consecutive_ids = consecutive_ids ,
87
+ job_id = job_id ,
88
+ log_progress = log_progress ,
89
+ node_labels = node_labels ,
90
+ relationship_types = relationship_types ,
91
+ relationship_weight_property = relationship_weight_property ,
92
+ seed_property = seed_property ,
93
+ sudo = sudo ,
94
+ threshold = threshold ,
94
95
)
95
96
96
97
job_id = JobClient .run_job_and_wait (self ._arrow_client , WCC_ENDPOINT , config )
@@ -121,19 +122,19 @@ def stream(
121
122
consecutive_ids : Optional [bool ] = None ,
122
123
relationship_weight_property : Optional [str ] = None ,
123
124
) -> DataFrame :
124
- config = ArrowConfigConverter . build_configuration (
125
- G ,
126
- concurrency = concurrency ,
127
- consecutive_ids = consecutive_ids ,
128
- job_id = job_id ,
129
- log_progress = log_progress ,
130
- min_component_size = min_component_size ,
131
- node_labels = node_labels ,
132
- relationship_types = relationship_types ,
133
- relationship_weight_property = relationship_weight_property ,
134
- seed_property = seed_property ,
135
- sudo = sudo ,
136
- threshold = threshold ,
125
+ config = ConfigConverter . convert_to_gds_config (
126
+ graph_name = G . name () ,
127
+ concurrency = concurrency ,
128
+ consecutive_ids = consecutive_ids ,
129
+ job_id = job_id ,
130
+ log_progress = log_progress ,
131
+ min_component_size = min_component_size ,
132
+ node_labels = node_labels ,
133
+ relationship_types = relationship_types ,
134
+ relationship_weight_property = relationship_weight_property ,
135
+ seed_property = seed_property ,
136
+ sudo = sudo ,
137
+ threshold = threshold ,
137
138
)
138
139
139
140
job_id = JobClient .run_job_and_wait (self ._arrow_client , WCC_ENDPOINT , config )
@@ -157,20 +158,19 @@ def write(
157
158
relationship_weight_property : Optional [str ] = None ,
158
159
write_concurrency : Optional [int ] = None ,
159
160
) -> WccWriteResult :
160
-
161
- config = ArrowConfigConverter .build_configuration (
162
- G ,
163
- concurrency = concurrency ,
164
- consecutive_ids = consecutive_ids ,
165
- job_id = job_id ,
166
- log_progress = log_progress ,
167
- min_component_size = min_component_size ,
168
- node_labels = node_labels ,
169
- relationship_types = relationship_types ,
170
- relationship_weight_property = relationship_weight_property ,
171
- seed_property = seed_property ,
172
- sudo = sudo ,
173
- threshold = threshold ,
161
+ config = ConfigConverter .convert_to_gds_config (
162
+ graph_name = G .name (),
163
+ concurrency = concurrency ,
164
+ consecutive_ids = consecutive_ids ,
165
+ job_id = job_id ,
166
+ log_progress = log_progress ,
167
+ min_component_size = min_component_size ,
168
+ node_labels = node_labels ,
169
+ relationship_types = relationship_types ,
170
+ relationship_weight_property = relationship_weight_property ,
171
+ seed_property = seed_property ,
172
+ sudo = sudo ,
173
+ threshold = threshold ,
174
174
)
175
175
176
176
job_id = JobClient .run_job_and_wait (self ._arrow_client , WCC_ENDPOINT , config )
@@ -192,4 +192,4 @@ def write(
192
192
computation_result ["postProcessingMillis" ],
193
193
computation_result ["nodePropertiesWritten" ],
194
194
computation_result ["configuration" ],
195
- )
195
+ )
0 commit comments