awslabs / kinesis-aggregation

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

Not able to specify 'Boto3' as a keyword argument for iter_deaggregate_records #137

Closed jesshart closed 3 years ago

jesshart commented 3 years ago

Python 3.8.6 aws_kinesis_agg 1.1.6

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

while True:
    try:

        next_shard_iterator = response['NextShardIterator']
        response = kinesis.get_records(
                            ShardIterator=next_shard_iterator, 
                            Limit=2
                            )

        records = response['Records']

        if records:     
            user_records = kd.iter_deaggregate_records(records, data_format='Boto3')
            for r in user_records:
                print(r)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-38-0d963f3b180a> in <module>
     39 
     40 
---> 41             user_records = kd.iter_deaggregate_records(records, data_format='Boto3')
     42             for r in user_records:
     43                 print(r)

TypeError: iter_deaggregate_records() got an unexpected keyword argument 'data_format'
IanMeyers commented 3 years ago

Version 1.1.7 now includes these updates https://pypi.org/project/aws-kinesis-agg/1.1.7/

jesshart commented 3 years ago

This is now working as hoped. Thank you @IanMeyers!