Skip to content

Commit 315f9ac

Browse files
authored
Merge pull request #1702 from tulibraries/update-sftp-hook-parameters
Use ssh_conn_id vs sftp_conn_id in SFTPHook call.
2 parents 1c8fae0 + 8880843 commit 315f9ac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cob_datapipeline/boundwith_move_alma_sftp_to_s3_dag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
)
4040

4141
def calculate_list_of_files_to_move(**context):
42-
sftp_conn = SFTPHook(ftp_conn_id=ALMA_SFTP_CONNECTION_ID)
42+
sftp_conn = SFTPHook(ssh_conn_id=ALMA_SFTP_CONNECTION_ID)
4343
files_list = sftp_conn.list_directory("./")
4444
# Ignore an file that does not start with this prefix
4545
files = [f for f in files_list if f.startswith("alma_bibs__boundwith2_20")]
@@ -69,7 +69,7 @@ def calculate_list_of_files_to_move(**context):
6969

7070
def archive_files_in_sftp(**context):
7171
"""Move sftp files into the archive folder"""
72-
sftp_conn = SFTPHook(ftp_conn_id=ALMA_SFTP_CONNECTION_ID)
72+
sftp_conn = SFTPHook(ssh_conn_id=ALMA_SFTP_CONNECTION_ID)
7373
# Paramiko is the underlying package used for SSH/SFTP conns
7474
# the paramiko client exposes a lot more core SFTP functionality
7575
paramiko_conn = sftp_conn.get_conn()

cob_datapipeline/catalog_move_alma_sftp_to_s3_dag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
)
4040

4141
def calculate_list_of_files_to_move(**context):
42-
sftp_conn = SFTPHook(ftp_conn_id=ALMA_SFTP_CONNECTION_ID)
42+
sftp_conn = SFTPHook(ssh_conn_id=ALMA_SFTP_CONNECTION_ID)
4343
files_list = sftp_conn.list_directory("./")
4444
# Ignore an file that does not start with this prefix
4545
just_alma_bibs_files = [f for f in files_list if f.startswith("alma_bibs__20")]
@@ -70,7 +70,7 @@ def calculate_list_of_files_to_move(**context):
7070

7171
def archive_files_in_sftp(**context):
7272
"""Move sftp files into the archive folder"""
73-
sftp_conn = SFTPHook(ftp_conn_id=ALMA_SFTP_CONNECTION_ID)
73+
sftp_conn = SFTPHook(ssh_conn_id=ALMA_SFTP_CONNECTION_ID)
7474
# Paramiko is the underlying package used for SSH/SFTP conns
7575
# the paramiko client exposes a lot more core SFTP functionality
7676
paramiko_conn = sftp_conn.get_conn()

0 commit comments

Comments
 (0)