awslabs / kinesis-aggregation

AWS libraries/modules for working with Kinesis aggregated record data
Apache License 2.0
376 stars 154 forks source link

Need parameter data_format in definition for deaggregate_records to use with Boto3 #138

Open jesshart opened 3 years ago

jesshart commented 3 years ago

Versions

Python 3.8.6 aws_kinesis_agg 1.1.6

Referencing

https://github.com/awslabs/kinesis-aggregation/blob/398fbd4b430d4bf590431b301d03cbbc94279cef/python/aws_kinesis_agg/deaggregator.py#L173 https://github.com/awslabs/kinesis-aggregation/blob/398fbd4b430d4bf590431b301d03cbbc94279cef/python/aws_kinesis_agg/deaggregator.py#L185

Recommended Changes

def deaggregate_records(records, data_format=None)
    return_records.extend(iter_deaggregate_records(records, data_format))        

If a developer using Boto3 is to use the deaggregate_records from deaggregator.py then they would need to be able to pass a parameter 'data_format='Boto3' since there is no way for the later called iter_deaggregate_records() to know about its format.

Referencing Function Definition

https://github.com/awslabs/kinesis-aggregation/blob/398fbd4b430d4bf590431b301d03cbbc94279cef/python/aws_kinesis_agg/deaggregator.py#L173-L186