-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Is your feature request related to a problem? Please describe.
I am unable to find a way to parameterize queries that are passed into the remote projection function. It seems like the suggested endpoint for remote projection requires that the query passed in is explicitly in the string format. I would also like the progress logging provided to be optional. It really messes with our json logger in production.
Describe the solution you would like
I would like parameters to be exposed in the GraphProjectRemoteRunner call procedure. I believe something like:
class GraphProjectRemoteRunner(IllegalAttrChecker):
@compatible_with("project", min_inclusive=ServerVersion(2, 7, 0))
def __call__(
self,
graph_name: str,
query: str | Query, # <-- Query object that unpacks parameterized values.
job_id: Optional[str] = None,
concurrency: int = 4,
undirected_relationship_types: Optional[list[str]] = None,
inverse_indexed_relationship_types: Optional[list[str]] = None,
batch_size: Optional[int] = None,
logProgress: bool = True
)
Alternatively:
class GraphProjectRemoteRunner(IllegalAttrChecker):
@compatible_with("project", min_inclusive=ServerVersion(2, 7, 0))
def __call__(
self,
graph_name: str,
query: str,
job_id: Optional[str] = None,
concurrency: int = 4,
undirected_relationship_types: Optional[list[str]] = None,
inverse_indexed_relationship_types: Optional[list[str]] = None,
batch_size: Optional[int] = None,
logProgress: bool = True,
**kwargs # or something called params.
)
It seems like the remote projection api may just be behind other api's for projection in the client library, those api's currently have this feature.
Describe alternatives you have considered
Suppose I have a list or a dictionary I would like to pass as parameters to the query. Right now I have to format a string to incorperate these values into the string with an awful str(dict).replace(""", "") (Wouldn't even work for Dict[str, str] ), and str(list).replace("", '').
Additional context