Skip to content

Use aws_conn_id intead of s3_conn_id #8

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/mysql_to_s3_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class MySQLToS3Operator(BaseOperator):
:type mysql_conn_id: string
:param mysql_table: The input MySQL table to pull data from.
:type mysql_table: string
:param s3_conn_id: The destination s3 connection id.
:type s3_conn_id: string
:param aws_conn_id: The destination s3 connection id.
:type aws_conn_id: string
:param s3_bucket: The destination s3 bucket.
:type s3_bucket: string
:param s3_key: The destination s3 key.
Expand Down Expand Up @@ -56,7 +56,7 @@ class MySQLToS3Operator(BaseOperator):
def __init__(self,
mysql_conn_id,
mysql_table,
s3_conn_id,
aws_conn_id,
s3_bucket,
s3_key,
package_schema=False,
Expand All @@ -68,7 +68,7 @@ def __init__(self,
super().__init__(*args, **kwargs)
self.mysql_conn_id = mysql_conn_id
self.mysql_table = mysql_table
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.package_schema = package_schema
Expand Down Expand Up @@ -132,7 +132,7 @@ def get_records(self, hook):
return results

def s3_upload(self, results, schema=False):
s3 = S3Hook(s3_conn_id=self.s3_conn_id)
s3 = S3Hook(aws_conn_id=self.aws_conn_id)
key = '{0}'.format(self.s3_key)
# If the file being uploaded to s3 is a schema, append "_schema" to the
# end of the file name.
Expand Down