[ 
https://issues.apache.org/jira/browse/BEAM-7577?focusedWorklogId=280364&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-280364
 ]

ASF GitHub Bot logged work on BEAM-7577:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Jul/19 12:30
            Start Date: 22/Jul/19 12:30
    Worklog Time Spent: 10m 
      Work Description: EDjur commented on pull request #8950: [BEAM-7577] 
Allow ValueProviders in Datastore Query filters
URL: https://github.com/apache/beam/pull/8950#discussion_r305818713
 
 

 ##########
 File path: sdks/python/apache_beam/io/gcp/datastore/v1new/types.py
 ##########
 @@ -84,6 +89,30 @@ def _to_client_query(self, client):
   def clone(self):
     return copy.copy(self)
 
+  def _set_runtime_filters(self):
+    """
+    Extracts values from ValueProviders in `self.filters` if available
+    :param filters: sequence of tuple[str, str, str] or
+    sequence of tuple[ValueProvider, ValueProvider, ValueProvider]
 
 Review comment:
   Back from vacation and looking at this again.
   
   The first iteration of this PR solves this issue in an acceptable way and 
worked when I tested the custom SDK on Dataflow. Having each filter as a 
sequence of tuple[ValueProvider, ValueProvider, ValueProvider] seems to be the 
only way to get around it when passing filters over an API call to a templated 
pipeline.
   
   You got any more thoughts on this @udim ?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 280364)
    Time Spent: 4.5h  (was: 4h 20m)

> Allow the use of ValueProviders in 
> datastore.v1new.datastoreio.ReadFromDatastore query
> --------------------------------------------------------------------------------------
>
>                 Key: BEAM-7577
>                 URL: https://issues.apache.org/jira/browse/BEAM-7577
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-python-gcp
>    Affects Versions: 2.13.0
>            Reporter: EDjur
>            Assignee: EDjur
>            Priority: Minor
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> The current implementation of ReadFromDatastore does not support specifying 
> the query parameter at runtime. This could potentially be fixed through the 
> usage of a ValueProvider to specify and build the Datastore query.
> Allowing specifying the query at runtime makes it easier to use dynamic 
> queries in Dataflow templates. Currently, there is no way to have a Dataflow 
> template that includes a dynamic query (such as filtering by a timestamp or 
> similar).



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to