Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jesshart opened this issue Mar 19, 2021 · 0 comments

Comments

@jesshart
Copy link

Versions

Python 3.8.6
aws_kinesis_agg 1.1.6

Referencing

def deaggregate_records(records):

return_records.extend(iter_deaggregate_records(records))

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

def deaggregate_records(records):
"""Given a set of Kinesis records, deaggregate any records that were packed using the
Kinesis Producer Library into individual records. This method will be a no-op for any
records that are not aggregated (but will still return them).
records - The list of raw Kinesis records to deaggregate. (list of dict)
return value - A list of Kinesis user records greater than or equal to the size of the
input record list. (list of dict)"""
# Use the existing generator function to deaggregate all the records
return_records = []
return_records.extend(iter_deaggregate_records(records))
return return_records

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant