handle optional compression format.

This commit is contained in:
Steve Pulec 2015-10-30 14:18:29 -04:00
parent 1c95de421d
commit 1b1cf40af8
2 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ class DeliveryStream(object):
self.redshift_s3_role_arn = stream_kwargs['redshift_s3_role_arn'] self.redshift_s3_role_arn = stream_kwargs['redshift_s3_role_arn']
self.redshift_s3_bucket_arn = stream_kwargs['redshift_s3_bucket_arn'] self.redshift_s3_bucket_arn = stream_kwargs['redshift_s3_bucket_arn']
self.redshift_s3_prefix = stream_kwargs['redshift_s3_prefix'] self.redshift_s3_prefix = stream_kwargs['redshift_s3_prefix']
self.redshift_s3_compression_format = stream_kwargs['redshift_s3_compression_format'] self.redshift_s3_compression_format = stream_kwargs.get('redshift_s3_compression_format', 'UNCOMPRESSED')
self.redshift_s3_buffering_hings = stream_kwargs['redshift_s3_buffering_hings'] self.redshift_s3_buffering_hings = stream_kwargs['redshift_s3_buffering_hings']
self.records = [] self.records = []

View File

@ -106,7 +106,7 @@ class KinesisResponse(BaseResponse):
'redshift_s3_role_arn': redshift_s3_config['RoleARN'], 'redshift_s3_role_arn': redshift_s3_config['RoleARN'],
'redshift_s3_bucket_arn': redshift_s3_config['BucketARN'], 'redshift_s3_bucket_arn': redshift_s3_config['BucketARN'],
'redshift_s3_prefix': redshift_s3_config['Prefix'], 'redshift_s3_prefix': redshift_s3_config['Prefix'],
'redshift_s3_compression_format': redshift_s3_config['CompressionFormat'], 'redshift_s3_compression_format': redshift_s3_config.get('CompressionFormat'),
'redshift_s3_buffering_hings': redshift_s3_config['BufferingHints'], 'redshift_s3_buffering_hings': redshift_s3_config['BufferingHints'],
} }
stream = self.kinesis_backend.create_delivery_stream(stream_name, **stream_kwargs) stream = self.kinesis_backend.create_delivery_stream(stream_name, **stream_kwargs)