riteshghorse commented on code in PR #30088:
URL: https://github.com/apache/beam/pull/30088#discussion_r1465072676
##########
sdks/python/apache_beam/transforms/enrichment_handlers/bigtable.py:
##########
@@ -122,9 +126,10 @@ def __call__(self, request: beam.Row, *args, **kwargs):
if row:
for cf_id, cf_v in row.cells.items():
response_dict[cf_id] = {}
- for k, v in cf_v.items():
- response_dict[cf_id][k.decode(self._encoding)] = \
- v[0].value.decode(self._encoding)
+ for col_id, col_v in cf_v.items():
+ response_dict[cf_id][col_id.decode(self._encoding)] = [
+ (v.value.decode(self._encoding), v.timestamp) for v in col_v
+ ]
Review Comment:
I don't have a strong opinion of keeping timestamp as well. It might be
useful for small pool of users. But thinking more, it may not be the ideal use
case for enrichment. If the timeseries data is there always, then probably a
BigTableIO is better option. For the constantly changing latest value,
Enrichment is the answer.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]