diff --git a/hooks/stripe_hook.py b/hooks/stripe_hook.py index 570b301..53d09f1 100755 --- a/hooks/stripe_hook.py +++ b/hooks/stripe_hook.py @@ -49,7 +49,7 @@ def run_query(self, method_to_call = 'all' if replication_key_value: stripe_response = getattr(stripe_endpoint, method_to_call)( - ending_before=replication_key_value, **kwargs) + starting_after=replication_key_value, **kwargs) else: stripe_response = getattr(stripe_endpoint, method_to_call)(**kwargs) diff --git a/operators/stripe_to_s3_operator.py b/operators/stripe_to_s3_operator.py index b91685a..1354dae 100755 --- a/operators/stripe_to_s3_operator.py +++ b/operators/stripe_to_s3_operator.py @@ -57,7 +57,7 @@ class StripeToS3Operator(BaseOperator, SkipMixin): :type replication_key_value: String """ - template_field = ('s3_key', ) + template_fields = ("s3_key", "replication_key_value") @apply_defaults def __init__(self, @@ -122,7 +122,7 @@ def execute(self, context): return True else: - dest_s3 = S3Hook(s3_conn_id=self.s3_conn_id) + dest_s3 = S3Hook(self.s3_conn_id) dest_s3.load_file( filename=tmp.name, key=self.s3_key, @@ -130,7 +130,7 @@ def execute(self, context): replace=True ) - dest_s3.connection.close() + tmp.close() def filter_fields(self, result):