Skip to content

s3_conn_id parameter switch #6

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions operators/marketo_to_s3_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class MarketoToS3Operator(BaseOperator, SkipMixin):
- avro
Defaults to json.
:type output_format string
:param s3_conn_id: The Airflow connection id used to store
:param aws_conn_id: The Airflow connection id used to store
the S3 credentials.
:type s3_conn_id: string
:type aws_conn_id: string
:param s3_bucket: The S3 bucket to be used to store
the Marketo data.
:type s3_bucket: string
Expand All @@ -66,7 +66,7 @@ class MarketoToS3Operator(BaseOperator, SkipMixin):
def __init__(self,
marketo_conn_id,
endpoint,
s3_conn_id,
aws_conn_id,
s3_bucket,
s3_key,
output_format='json',
Expand All @@ -78,7 +78,7 @@ def __init__(self,
super().__init__(*args, **kwargs)
self.marketo_conn_id = marketo_conn_id
self.endpoint = endpoint.lower()
self.s3_conn_id = s3_conn_id
self.aws_conn_id = aws_conn_id
self.s3_bucket = s3_bucket
self.s3_key = s3_key
self.output_format = output_format.lower()
Expand Down Expand Up @@ -276,7 +276,7 @@ def outputManager(self, output, key, bucket, output_format='json'):

output_file = tmp.name

s3 = S3Hook(s3_conn_id=self.s3_conn_id)
s3 = S3Hook(aws_conn_id=self.aws_conn_id)

s3.load_file(
filename=output_file,
Expand Down